Calendar: Difference between revisions

8 bytes removed ,  13 years ago
Line 167:
=={{header|D}}==
{{works with|D|2}}
<lang d>import std.stdio, std.datetime, std.string, std.exception, std.conv, std.math;
 
void main() {
Line 176:
enforce(1 <= cols && cols <= 12);
auto rows = cast(int)ceil(12.0 / cols + (12 % cols != 0);
auto date = Date(year, 1, 1);
auto offs = cast(int)date.dayOfWeek();
Anonymous user