pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #14527: Calandar Week
2+ messages / 2 participants
[nested] [flat]
* BUG #14527: Calandar Week
@ 2017-02-02 16:50 jcantin@strategicfuse.com
0 siblings, 1 reply; 2+ messages in thread
From: jcantin@strategicfuse.com @ 2017-02-02 16:50 UTC (permalink / raw)
To: pgsql-bugs
The following bug has been logged on the website:
Bug reference: 14527
Logged by: John Cantin
Email address: jcantin@strategicfuse.com
PostgreSQL version: 9.3.6
Operating system: centos 7
Description:
Postgres seems to define calendar week differently depending on the function
called.
The extract function shows '2017-1-1' as week 52 but the to_char function
shows it as 1
select extract('week' from '2017-1-1'::date) as week
select to_char('2017-1-1'::date,'ww')
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: BUG #14527: Calandar Week
@ 2017-02-02 17:21 Tom Lane <tgl@sss.pgh.pa.us>
parent: jcantin@strategicfuse.com
0 siblings, 0 replies; 2+ messages in thread
From: Tom Lane @ 2017-02-02 17:21 UTC (permalink / raw)
To: jcantin@strategicfuse.com; +Cc: pgsql-bugs
jcantin@strategicfuse.com writes:
> Postgres seems to define calendar week differently depending on the function
> called.
Yup, there's the "ISO 8601" way of counting weeks and the not-so-ISO way.
Read the manual carefully.
(The great thing about standards is there are so many to choose from.)
regards, tom lane
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2017-02-02 17:21 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-02-02 16:50 BUG #14527: Calandar Week jcantin@strategicfuse.com
2017-02-02 17:21 ` Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox