View source code
Display the source code in std/datetime/systime.d from which this page was generated on github.
Report a bug
If you spot a problem with this page, click here to create a Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page. Requires a signed-in GitHub account. This works well for small changes. If you'd like to make larger changes you may want to consider using local clone.

Function std.datetime.systime.SysTime.daysInMonth

The last day in the month that this SysTime is in.

ubyte daysInMonth() nothrow @property scope @safe const;


import core.time;
import : DateTime;

writeln(SysTime(DateTime(1999, 1, 6, 0, 0, 0)).daysInMonth); // 31
writeln(SysTime(DateTime(1999, 2, 7, 19, 30, 0)).daysInMonth); // 28
writeln(SysTime(DateTime(2000, 2, 7, 5, 12, 27)).daysInMonth); // 29
writeln(SysTime(DateTime(2000, 6, 4, 12, 22, 9)).daysInMonth); // 30


Jonathan M Davis


Boost License 1.0.