Jump to content

Module talk:Date time

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Jc3s5h (talk | contribs) at 23:33, 26 February 2025 (Should nil values be confined to the least significant values?: add to comment). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Should nil values be confined to the least significant values?

Should the module be modified to require that there be no nil values between the most significant value and the least significant values. For example, if month is nil but day is 1, should that trigger an error?

Since a time zone is sometimes handled by some of the templates that call this, it might be useful to either validate the time zone, or at least return the number of the least significant non-nil value. For example, if all the values are non-nil for minute and above, it makes sense to have a non-nil time zone, and returning 5 would provide that information to the calling function. If the least significant non-nil value were day, it's questionable whether it's valid to use a time zone. Jc3s5h (talk) 23:18, 26 February 2025 (UTC)[reply]