Back to questions
JuniorTheoryCommon
What does the program print (lines separated by spaces)?
Дата1 = '20240131';
Сообщить(Формат(ДобавитьМесяц(Дата1, 1), "ДФ=dd.MM.yyyy"));
Сообщить(Формат(КонецМесяца(Дата1), "ДФ='dd.MM.yyyy HH:mm'"));29.02.2024 31.01.2024 23:59
- Expecting 31 January plus a month to spill into March:
ДобавитьМесяцclamps the date to the last day of February - Expecting
КонецМесяцаto return the start of the last day: it returns its last second, 23:59:59
- What does
ДобавитьМесяц('20240229', 12)return? - How do you get the first day of the next month from any date?