Date formatting in D

Daniel Kozak via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Mar 7 13:22:05 PST 2017


Dne 7.3.2017 v 22:07 aberba via Digitalmars-d-learn napsal(a):

> On Tuesday, 7 March 2017 at 20:29:07 UTC, aberba wrote:
>> I've been trying to figure out an inbuilt functionality in phobos for 
>> formatting date. In my use case, I've been trying to format current 
>> Unix timestamp to something like "Thu, 08 Mar 2017 12:00:00 GMT".
>>
>> How do I go by this easily (Currently, long concatenation of strings 
>> is what I'm thinking)?
>>
>> I saw this thread[1] from 2011 on similar issue. Has it been 
>> resolved? What is the state of toCustomString?
>>
>> [1] 
>> http://forum.dlang.org/post/mailman.673.1320367887.24802.digitalmars-d-learn@puremagic.com
>
> Just found this http://code.dlang.org/packages/datetimeformat.
>
> Why is Phobos not still not having this in 2017?

I have looked at some of our many years old codebase and we use
http://dlang.org/phobos/std_format.html#.formattedRead

and

http://dlang.org/phobos/std_format.html#.formattedWrite



More information about the Digitalmars-d-learn mailing list