Proposal for custom time string formatting in std.datetime

Stewart Gordon smjg_1998 at yahoo.com
Fri Dec 23 02:17:00 PST 2011


On 23/12/2011 03:55, Jonathan M Davis wrote:
<snip>
>> - If you're going to have the ISO week number in the system, it seems to me
>> you should also have the week-numbering year.  (I've thought about possibly
>> adding these to my scheme.)
>
> %isoweek and %C2isoweek

What are you saying?  That the documentation is wrong, and %isoweek emits a year, not a week?

>> - In %F, What does "as many digits as necessary" mean?  In particular, why
>> in the example code does it give 12/100000 and not 3/25000 despite the
>> latter being shorter?
>
> Obviously, that needs to be clearer. The denominator is always a multiple of
> 10. It's what the mpeg-7 standard uses, which is why it's there.
<snip>

What's that to do with it?  25000 _is_ a multiple of 10.  And 3/25000 contains 6 digits, 
compared to 12/100000's 8.  So the spec reads to the effect that %F should generate 
3/25000 in that example.

Stewart.


More information about the Digitalmars-d mailing list