How can I encode a calendar? I mean, how can I determine the days of the month, is it the 1st Monday, Tuesday or something else. how many days in a particular month, etc.
I mainly use PHP and C #. But I'm mostly looking for logic
Take a look at the type DateTimein MSDN for C #.
DateTime
You can define the weekday of a given day as follows:
var date = DateTime.Parse("16.10.2010"); Console.WriteLine(date.DayOfWeek);
If you are looking for the number of days per month, try the following:
Console.WriteLine(DateTime.DaysInMonth(date.Year, date.Month));
( PHP #) , , .
PHP date() getdate() , , , timestamp.
date()
getdate()
, PHP mktime(), , getdate(), .
mktime()
, , (, Jan = 31, ..), , 1- , 24 , .
PHP (, 5.3), , . ( PHP 5.2, , 5.3).
GregorianCalendar #. , "" .
GregorianCalendar
, , DateTime .
Source: https://habr.com/ru/post/1769870/More articles:In .Net, how do I decorate a class with an intellisense hint? - .netGetting m2eclipse to match maven classpath - javato determine the change in state of energy - c #Django does not create variable {{debug}} in DEBUG mode - debuggingEnabling dependencies in (Python) Google App Engine - pythonAdvertising system suitable for ajax applications - ajaxCompilation with header files - cGoogle Chrome загружает источник PHP-скриптов - google-chromeHow to change the color of equations in MathJax - javascriptComment Illegal Unicode Sequences - javaAll Articles