Add builtin functions LAST_DAY and FIRST_DAY --------------------------------------------
Key: CORE-5620 URL: http://tracker.firebirdsql.org/browse/CORE-5620 Project: Firebird Core Issue Type: New Feature Components: Engine Reporter: Adriano dos Santos Fernandes Firebird lacks very commonly used functions to manage dates. They can be added as UDF or PSQL functions, but since they're very common and need to be registered in every database it would be good to have them as bultin functions. I suggest these two functions: LAST_DAY( <date or timestamp> [ OF { MONTH | YEAR } ) FIRST_DAY( <date or timestamp> [ OF { MONTH | YEAR } ) If "OF ..." clause is omitted, it assumes OF MONTH. LAST_DAY(date '2017-09-15') -- 2017-09-30 LAST_DAY(date '2017-09-15' of month) -- 2017-09-30 LAST_DAY(date '2017-09-15' of year) -- 2017-12-31 FIRST_DAY(date '2017-09-15') -- 2017-09-01 FIRST_DAY(date '2017-09-15' of month) -- 2017-09-01 FIRST_DAY(date '2017-09-15' of year) -- 2017-01-01 -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://tracker.firebirdsql.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel