mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
Fix a round-off error in the %W and %j conversions of the strftime() function.
Ticket #2150. (CVS 3570) FossilOrigin-Name: 52067937803e6b36afc8f11c5d24059414208b77
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
** sqlite3RegisterDateTimeFunctions() found at the bottom of the file.
|
||||
** All other code has file scope.
|
||||
**
|
||||
** $Id: date.c,v 1.58 2006/09/25 18:05:04 drh Exp $
|
||||
** $Id: date.c,v 1.59 2007/01/08 13:07:30 drh Exp $
|
||||
**
|
||||
** NOTES:
|
||||
**
|
||||
@@ -840,7 +840,7 @@ static void strftimeFunc(
|
||||
y.M = 1;
|
||||
y.D = 1;
|
||||
computeJD(&y);
|
||||
nDay = x.rJD - y.rJD;
|
||||
nDay = x.rJD - y.rJD + 0.5;
|
||||
if( zFmt[i]=='W' ){
|
||||
int wd; /* 0=Monday, 1=Tuesday, ... 6=Sunday */
|
||||
wd = ((int)(x.rJD+0.5)) % 7;
|
||||
|
Reference in New Issue
Block a user