From db05f4a7eb6c80c67c25ca9d28be825b99ed3553 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Wed, 20 Jul 2005 16:42:32 +0000 Subject: Add 'day' field to INTERVAL so 1 day interval can be distinguished from 24 hours. This is very helpful for daylight savings time: select '2005-05-03 00:00:00 EST'::timestamp with time zone + '24 hours'; ?column? ---------------------- 2005-05-04 01:00:00-04 select '2005-05-03 00:00:00 EST'::timestamp with time zone + '1 day'; ?column? ---------------------- 2005-05-04 01:00:00-04 Michael Glaesemann --- doc/src/sgml/func.sgml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'doc/src') diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index 9fd6ed61f8e..43f720ae10f 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -1,5 +1,5 @@ @@ -5144,6 +5144,22 @@ SELECT SUBSTRING('XY1234Z', 'Y*?([0-9]{1,3})'); true + + justify_hours(interval) + interval + Adjust interval so 24-hour time periods are represented as days + justify_hours(interval '24 hours') + 1 day + + + + justify_days(interval) + interval + Adjust interval so 30-day time periods are represented as months + justify_days(interval '30 days') + 1 month + + localtime time -- cgit v1.2.3