> I am not necessarily worried about sigils because sigils are always 
compile-time literals. It is probably fine to enforce a given format there 
rather than multiple ones.

Agreed! What I am wondering here is if the sigils -- and other parsing 
functions -- should probably be universally accepting; ie not require 
specifying a format and letting any valid date through by default. Does 
that seem reasonable to you?

On Thursday, February 4, 2021 at 2:45:27 PM UTC-8 José Valim wrote:

>  
>
>> I like José's suggesting of supporting a flag, but it gets kind of 
>> complicated as there are several dimensions here even in our reduced case. 
>> Dates, times, and datetimes support either basic or extended notations; 
>> dates and datetimes support calendar dates or ordinal dates; both are 
>> applicable to any parsing.
>>
>
> Are we 100% sure that ordinal datetimes are part of ISO8601? Kip, can you 
> please confirm?
>  
>
>> If we went with this approach I'd lean towards always accepting either 
>> form for one of the dimensions, and using flags to the sigil and parsing 
>> functions to indicate intent for the other.
>>
>
> I am not necessarily worried about sigils because sigils are always 
> compile-time literals. It is probably fine to enforce a given format there 
> rather than multiple ones.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-core/dbc36578-362b-4a4c-9a97-ac6026149267n%40googlegroups.com.

Reply via email to