I agree except that people may expect yy-mm-dd to truncate, likely one of 
the reasons for the ccyy-mm-dd strict form. Where yy is defined as the two 
digit year. 

On Friday, August 28, 2015 at 11:51:14 AM UTC-4, Stefan Karpinski wrote:
>
> The safest option is probably to raise an error.
>
> On Fri, Aug 28, 2015 at 11:47 AM, Jacob Quinn <[email protected] 
> <javascript:>> 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