www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - date and timestamp

reply guai <guai fake.mail> writes:
Hi, forum

I have two questions:

1) Why __DATE__ and __TIMESTAMP__ have these insane formats?
"mmm dd yyyy" and "www mmm dd hh:mm:ss yyyy"
I think its the first time in my life I encounter something like 
this. start with date, then print time, then the rest of the date 
- what?

2) Are those locale-specific?
Apr 29 2020
parent wolframw <wolframw protonmail.com> writes:
On Wednesday, 29 April 2020 at 22:22:04 UTC, guai wrote:
 Hi, forum

 I have two questions:

 1) Why __DATE__ and __TIMESTAMP__ have these insane formats?
 "mmm dd yyyy" and "www mmm dd hh:mm:ss yyyy"
 I think its the first time in my life I encounter something 
 like this. start with date, then print time, then the rest of 
 the date - what?

 2) Are those locale-specific?
There was a similar discussion some time ago where Walter also explained the origin of these formats: https://forum.dlang.org/post/p4c8ka$2np$1 digitalmars.com
Apr 29 2020