With regard to the original question, it is very convenient to have a 
formatting symbol that means "the year, with as many digits as needed"  -- 
a single 'y' might be so interpreted; the alternative would be 'Y', that 
breaks the 'lowercase for y/m/d' pattern.

On Friday, August 28, 2015 at 11:47:17 AM UTC-4, Jacob Quinn wrote:
>
> Hmmmmm.......it's not entirely clear to me what we should do here.
>
> On the one hand, when you ask to have the typemax(Date) formatted, it's 
> currently doing what you asked, "formatting the year with 4 digits". 
> Because your year in this case is greater than 4 digits, that results in 
> truncation, which probably isn't what you want. But is it ok to give you 
> all the digits even though you only asked for 4? I'd appreciate any other 
> thoughts/input on this.
>
> I do think the Date/DateTime parsing/formatting code needs another once 
> over to polish it up, so any ideas on allowing more 
> flexibility/functionality would be appreciated.
>
> -Jacob
>
>
>
> On Friday, August 28, 2015 at 9:33:25 AM UTC-6, Michael Francis wrote:
>>
>> It seems that there is an issue with typemax of dates and string 
>> representation
>>
>> julia> using Dates
>>
>>
>> julia> Dates.format(typemax( Date ),"yyyy-mm-dd" )
>> "1149-12-31"
>>
>>
>> julia> typemax( Date )
>> 252522163911149-12-31
>>
>>
>> julia> Dates.format(typemax( Date ),"yyyyyyyyyyyyyyy-mm-dd" )
>> "252522163911149-12-31"
>>
>> This hidden truncation seems dangerous. Has anybody else seen this ? 
>>
>

Reply via email to