Skip to content

Fix Dateformat typo, fix hours casing, add Month-Day-Year formats #591

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 18, 2018
Merged

Fix Dateformat typo, fix hours casing, add Month-Day-Year formats #591

merged 2 commits into from
Mar 18, 2018

Conversation

ComputerTinker
Copy link
Contributor

  • Fixed a typo: d-M-yyy -> d-M-yyyy
  • Fixed the casing on the hours to be correct for two formats. (Hours can be either "HH" or "h", but "H" is invalid.)
  • Expanded the list of valid date formats, mostly to add support for Month-Day-Year formats, but also added several new Day-Month-Year formats as well.

Here's the output from my Word document when I tested each of the formats below. (Output is arranged in the order in which the array elements are specified):

8/6/2015
2015-08-06
2015-08
Aug-15
Aug-2015
1:19 PM
1:19:40 PM
13:19
13:19:40
Thursday 6 August 2015
6 August 2015
6-Aug-15
6 Aug. 15
6-8-15
6-8-15 1:19
6-8-15 1:19:40
6-8-15 1:19 PM
6-8-15 1:19:40 PM
6-8-15 13:19
6-8-15 13:19:40
6/8/15
6/8/15 1:19
6/8/15 1:19:40
6/8/15 1:19 PM
6/8/15 1:19:40 PM
6/8/15 13:19
6/8/15 13:19:40
6-8-2015
6-8-2015 1:19
6-8-2015 1:19:40
6-8-2015 1:19 PM
6-8-2015 1:19:40 PM
6-8-2015 13:19
6-8-2015 13:19:40
6/8/2015
6/8/2015 1:19
6/8/2015 1:19:40
6/8/2015 1:19 PM
6/8/2015 1:19:40 PM
6/8/2015 13:19
6/8/2015 13:19:40
Thursday, August 6 2015
August 6 2015
Aug-6-15
Aug. 6 15
8-6-15
8-6-15 1:19
8-6-15 1:19:40
8-6-15 1:19 PM
8-6-15 1:19:40 PM
8-6-15 13:19
8-6-15 13:19:40
8/6/15
8/6/15 1:19
8/6/15 1:19:40
8/6/15 1:19 PM
8/6/15 1:19:40 PM
8/6/15 13:19
8/6/15 13:19:40
8-6-2015
8-6-2015 1:19
8-6-2015 1:19:40
8-6-2015 1:19 PM
8-6-2015 1:19:40 PM
8-6-2015 13:19
8-6-2015 13:19:40
8/6/2015
8/6/2015 1:19
8/6/2015 1:19:40
8/6/2015 1:19 PM
8/6/2015 1:19:40 PM
8/6/2015 13:19
8/6/2015 13:19:40

Russ added 2 commits August 6, 2015 12:50
Fix a typo (d-M-yyy H:mm), and expand the list of valid date formats.
Time formats should either be "h" or "HH".  There were some formats
which were incorrectly specified as "H".
@troosan troosan merged commit a9398e3 into PHPOffice:develop Mar 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants