Skip to content

Commit

Permalink
Merge pull request PHPOffice#4325 from oleibman/sampsup
Browse files Browse the repository at this point in the history
Fix 2 Samples
  • Loading branch information
oleibman authored Jan 22, 2025
2 parents 3f15579 + 191bf21 commit ed66270
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion samples/Reading_workbook_data/Custom_properties.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

break;
case 'd': // date
$propertyValue = is_numeric($propertyValue) ? date('l, d<\s\u\p>S</\s\u\p> F Y g:i A', (int) $propertyValue) : '*****INVALID*****';
$propertyValue = is_numeric($propertyValue) ? date('l, j<\s\u\p>S</\s\u\p> F Y g:i A', (int) $propertyValue) : '*****INVALID*****';
$propertyType = 'date';

break;
Expand Down
4 changes: 2 additions & 2 deletions samples/Reading_workbook_data/Properties.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

// Read the Date when the workbook was created (as a PHP timestamp value)
$creationDatestamp = $spreadsheet->getProperties()->getCreated();
$creationDate = Date::formattedDateTimeFromTimestamp("$creationDatestamp", 'l, d<\s\up>S</\s\up> F Y');
$creationDate = Date::formattedDateTimeFromTimestamp("$creationDatestamp", 'l, j<\s\u\p>S</\s\u\p> F Y');
$creationTime = Date::formattedDateTimeFromTimestamp("$creationDatestamp", 'g:i A');
$helper->log('<b>Created On: </b>' . $creationDate . ' at ' . $creationTime);

Expand All @@ -30,7 +30,7 @@
// Read the Date when the workbook was last modified (as a PHP timestamp value)
$modifiedDatestamp = $spreadsheet->getProperties()->getModified();
// Format the date and time using the standard PHP date() function
$modifiedDate = Date::formattedDateTimeFromTimestamp("$modifiedDatestamp", 'l, d<\s\up>S</\s\up> F Y');
$modifiedDate = Date::formattedDateTimeFromTimestamp("$modifiedDatestamp", 'l, j<\s\u\p>S</\s\u\p> F Y');
$modifiedTime = Date::formattedDateTimeFromTimestamp("$modifiedDatestamp", 'g:i A');
$helper->log('<b>Last Modified On: </b>' . $modifiedDate . ' at ' . $modifiedTime);

Expand Down

0 comments on commit ed66270

Please sign in to comment.