1
0
mirror of https://github.com/postgres/postgres.git synced 2025-12-21 05:21:08 +03:00

> > I have no idea if this in Oracle or not. But it's something I

> > needed, and other people in the past asked about it too.
>
> It is in Oracle, but you aren't exactly on the spot.  It should be
>
> IYYY - 4 digits  ('2003')
> IYY  - 3 digits  ('003')
> IY   - 2 digits  ('03')
> I    - 1 digit   ('3')

Here is an updated patch that does that.

Kurt Roeckx
This commit is contained in:
Bruce Momjian
2003-12-25 03:36:24 +00:00
parent 03caf7649b
commit 1c757c49fa
6 changed files with 220 additions and 10 deletions

View File

@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $PostgreSQL: pgsql/src/include/utils/timestamp.h,v 1.32 2003/11/29 22:41:16 pgsql Exp $
* $PostgreSQL: pgsql/src/include/utils/timestamp.h,v 1.33 2003/12/25 03:36:24 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -248,5 +248,6 @@ extern void GetEpochTime(struct tm * tm);
extern void isoweek2date(int woy, int *year, int *mon, int *mday);
extern int date2isoweek(int year, int mon, int mday);
extern int date2isoyear(int year, int mon, int mday);
#endif /* TIMESTAMP_H */