Hi,
    When the date function is given a date between 999BC and 1BC in Julian
days it formats the year with only 3 digits rather than 4:

    select julianday('-0050-01-01');
    > 1702797.5
    select date(1702797.5);
    > -050-01-01

    Shouldn't the returned value actually be '-0050-01-01' (As mentioned in
the ISO 8601 standard's wiki page:
https://en.wikipedia.org/wiki/ISO_8601#Years)?

    Dates earlier than 999BC return 4 digits prefixed with a sign character:

    select date(1270350.5);
    > -1234-01-01

    and dates from the first century onward are padded with leading 0s:

    select date(1721790.5);
    > 0002-01-01

    If the dates from 999BC to 1BC were returned in the format -YYYY-MM-DD
they'd have the nice property of being valid input for the julianday
function (this is currently true for all dates apart from this problematic
range).

Thanks,
    Indy
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to