]> granicus.if.org Git - postgresql/commit
Add two new format fields for use with to_char(), to_date() and
authorBruce Momjian <bruce@momjian.us>
Fri, 16 Feb 2007 03:39:46 +0000 (03:39 +0000)
committerBruce Momjian <bruce@momjian.us>
Fri, 16 Feb 2007 03:39:46 +0000 (03:39 +0000)
commit4ebb0cf9c30c1e477d5e2dfcc1f2c016c3f8bbcf
treefd6ce21ac074478e57b9f55ff378a4ae1a04d14f
parentc7b08050d9a2b68b27045b36ff4c9a3db85a55e4
Add two new format fields for use with to_char(), to_date() and
to_timestamp():
    - ID for day-of-week
    - IDDD for day-of-year

This makes it possible to convert ISO week dates to and from text
fully represented in either week ('IYYY-IW-ID') or day-of-year
('IYYY-IDDD') format.

I have also added an 'isoyear' field for use with extract / date_part.

Brendan Jurd
12 files changed:
doc/src/sgml/func.sgml
src/backend/utils/adt/date.c
src/backend/utils/adt/datetime.c
src/backend/utils/adt/formatting.c
src/backend/utils/adt/timestamp.c
src/include/utils/datetime.h
src/include/utils/timestamp.h
src/interfaces/ecpg/pgtypeslib/dt.h
src/test/regress/expected/timestamp.out
src/test/regress/expected/timestamptz.out
src/test/regress/sql/timestamp.sql
src/test/regress/sql/timestamptz.sql