Commit Graph

13 Commits

Author SHA1 Message Date
Azat Khuzhin
315906b380 Add ability to parse hours/months without leading zeros
Recently I was looking into one dataset, that has such format.

So I've changed the meaning of the following formatters for
formatDateTime()/parseDateTime(), like in other implementations [1]:

- %l/%k - to handle hours without leading zeros
- %c - handle months without leading zeros

  [1]: https://www.php.net/strftime

And since this is kind of behaviour change (even though it is unlikely
will break something), there is a new setting to control this new
behaviour:
- parsedatetime_enable_format_without_leading_zeros=1 (default ON)
- formatdatetime_enable_format_without_leading_zeros=0 (default OFF, since this could change users output)

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-11-26 19:10:17 +01:00
Robert Schulze
5eb31bba87
MySQL compat: Align behavior of %f in formatDateTime() with parseDateTime() 2023-04-06 08:13:04 +00:00
Robert Schulze
65609340cc
Yet another fix 2023-04-05 20:23:41 +00:00
Robert Schulze
809a7fbb7a
Incorporate more review feedback 2023-04-05 19:43:30 +00:00
Robert Schulze
3db38dbb5a
Replace mySQL date formatter M behavior from minutes to month name 2023-03-27 14:00:51 +00:00
Jake Bamrah
4ea814a843 add DATE_FORMAT alias and remaining mySQL date formatters 2023-02-16 09:52:19 +00:00
Alexander Gololobov
2a3aa5248e Test %f for data types without fractional seconds 2022-12-21 19:57:30 +01:00
ltrk2
d28631354f Implement yet another functional test 2022-12-08 15:14:14 -08:00
ltrk2
cae7a1d24a Implement formatDateTime fractional second formatter 2022-12-08 14:53:16 -08:00
Roman Vasin
4a4fb20731 Add Date32 to 01411_from_unixtime and improve 00718_format_datetime 2022-10-28 14:08:28 +00:00
Roman Vasin
8bd94979eb Add test queries for Date32 2022-10-27 10:46:41 +00:00
Cory Levy
4a9ccc6496 Fix timezone offset tests 2022-08-30 13:42:12 -04:00
Ivan
97f2a2213e
Move all folders inside /dbms one level up (#9974)
* Move some code outside dbms/src folder
* Fix paths
2020-04-02 02:51:21 +03:00