Logo

Programming-Idioms

History of Idiom 61 > diff from v10 to v11

Edit summary for version 11 by :

Version 10

2015-08-20, 16:59:49

Version 11

2015-08-20, 17:02:14

Idiom #61 Get current date

Assign to variable d the current date/time value, in the most standard type.

Idiom #61 Get current date

Assign to variable d the current date/time value, in the most standard type.

Imports
import std.datetime;
Imports
import std.datetime;
Code
auto d = Clock.currTime;
Code
auto d = Clock.currTime;
Comments bubble
Returns the current date in the format "YYYY-Mon-DD HH:MM:SS.FFFFFFFTZ" where F is fractional seconds and TZ is the time zone.
Comments bubble
Returns the current system time.
Demo URL
http://dpaste.dzfl.pl/d474bfb0c9d8
Demo URL
http://dpaste.dzfl.pl/d474bfb0c9d8