On Wed, Oct 24, 2012 at 1:06 PM, <ka...@kagan.de> wrote:

> Dear sir or madam,
>
> I have tested sqlite version 3.6. and version 3.7.14.1 with the following
> inputs:
>
> select julianday('2005-02-29');
> select julianday('2005-02-30');
>
> In both cases, it should have returned NULL, but it returned a number.
>

The date-time functions all accept day numbers up to and including 31 on
all months, even months that have fewer days.  These extra days on the end
of each month roll over into the following month.  So, for example, all of
the following are equivalent:

    julianday('2005-02-29')==julianday('2005-03-01')
    julianday('2005-02-30')==julianday('2005-03-02')
    julianday('2005-02-31')==julianday('2005-03-03')
    julianday('2005-04-31')==julianday('2005-05-01')


>
> In the first case, the year 2005 is not a leap year. Therefore, this date
> is not valid.
> In the second case, February has never 30 days.
>
> Regards,
>
> Kagan Kayal
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



-- 
D. Richard Hipp
d...@sqlite.org
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to