Re: Date formatting in D

2017-03-08 Thread Adam D. Ruppe via Digitalmars-d-learn
On Wednesday, 8 March 2017 at 16:00:26 UTC, aberba wrote: Your docs page is really effective, not pretty though. If you have specific complaints/suggestions, feel free to make a thread in the General forum, or email me destructiona...@gmail.com and I'll see what I can do (just don't want to

Re: Date formatting in D

2017-03-08 Thread aberba via Digitalmars-d-learn
On Wednesday, 8 March 2017 at 15:46:42 UTC, Adam D. Ruppe wrote: On Wednesday, 8 March 2017 at 15:29:11 UTC, aberba wrote: [...] The PHP function is basically just (translated to D): string date(string format, time_t timestamp) { char[256] buffer; auto ret = strftime(buffer.ptr, buff

Re: Date formatting in D

2017-03-08 Thread Adam D. Ruppe via Digitalmars-d-learn
On Wednesday, 8 March 2017 at 15:29:11 UTC, aberba wrote: Having to do these stuff with C is a punch in the face. Or PHP was: date(format, timestamp); The PHP function is basically just (translated to D): string date(string format, time_t timestamp) { char[256] buffer; auto ret = st

Re: Date formatting in D

2017-03-08 Thread aberba via Digitalmars-d-learn
On Tuesday, 7 March 2017 at 20:52:39 UTC, ikod wrote: 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

Re: Date formatting in D

2017-03-07 Thread Jonathan M Davis via Digitalmars-d-learn
On Tuesday, March 07, 2017 22:15:39 Daniel Kozak via Digitalmars-d-learn wrote: > I do not know? Is this some ISO/ANSI format for dates? If yes than we > should add it. If no there is no reason. The ISO formats are already there. There's to/fromISOString and to/fromISOExtString on SysTime, DateTi

Re: Date formatting in D

2017-03-07 Thread Daniel Kozak via Digitalmars-d-learn
Dne 7.3.2017 v 21:29 aberba via Digitalmars-d-learn napsal(a): 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

Re: Date formatting in D

2017-03-07 Thread Daniel Kozak via Digitalmars-d-learn
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

Re: Date formatting in D

2017-03-07 Thread Daniel Kozak via Digitalmars-d-learn
I do not know? Is this some ISO/ANSI format for dates? If yes than we should add it. If no there is no reason. 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 phobo

Re: Date formatting in D

2017-03-07 Thread aberba via Digitalmars-d-learn
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 (Curre

Re: Date formatting in D

2017-03-07 Thread ikod via Digitalmars-d-learn
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 (Curre

Date formatting in D

2017-03-07 Thread aberba via Digitalmars-d-learn
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