Skip to content
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

4 php8.1 #1

Open
wants to merge 3 commits into
base: 4
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"require": {
"silverstripe/cms": "^4",
"johngrogg/ics-parser": "^2",
"nesbot/carbon": "1.39.1"
"nesbot/carbon": "^2"
},
"support": {
"issues": "https://github.com/unclecheese/silverstripe-event-calendar/issues"
Expand Down
42 changes: 21 additions & 21 deletions src/Helpers/CalendarUtil.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,26 +50,26 @@ class CalendarUtil
public static function format_character_replacements($start, $end)
{
return [
strftime('%a', $start),
strftime('%A', $start),
date('D', $start),
date('l'. $start),
date ('j', $start),
date ('d', $start),
date ('S', $start),
date ('n', $start),
date ('m', $start),
strftime('%b', $start),
strftime('%B', $start),
date('M', $start),
date('F', $start),
date ('y', $start),
date ('Y', $start),
strftime('%a', $end),
strftime('%A', $end),
date('D', $end),
date('l'. $end),
date ('j', $end),
date ('d', $end),
date ('S', $end),
date ('n', $end),
date ('m', $end),
strftime('%b', $end),
strftime('%B', $end),
date('M', $end),
date('F', $end),
date ('y', $end),
date ('Y', $end),
];
Expand Down Expand Up @@ -178,21 +178,21 @@ public static function microformat($date, $time, $offset = null)
/**
* @return array
*/
public static function get_months_map($key = '%b')
public static function get_months_map($key = 'M')

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are there any instances that use this method that you will also need to update

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As of the moment, there is none

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

{
return [
'01' => strftime($key, strtotime('2000-01-01')),
'02' => strftime($key, strtotime('2000-02-01')),
'03' => strftime($key, strtotime('2000-03-01')),
'04' => strftime($key, strtotime('2000-04-01')),
'05' => strftime($key, strtotime('2000-05-01')),
'06' => strftime($key, strtotime('2000-06-01')),
'07' => strftime($key, strtotime('2000-07-01')),
'08' => strftime($key, strtotime('2000-08-01')),
'09' => strftime($key, strtotime('2000-09-01')),
'10' => strftime($key, strtotime('2000-10-01')),
'11' => strftime($key, strtotime('2000-11-01')),
'12' => strftime($key, strtotime('2000-12-01'))
'01' => date($key, strtotime('2000-01-01')),
'02' => date($key, strtotime('2000-02-01')),
'03' => date($key, strtotime('2000-03-01')),
'04' => date($key, strtotime('2000-04-01')),
'05' => date($key, strtotime('2000-05-01')),
'06' => date($key, strtotime('2000-06-01')),
'07' => date($key, strtotime('2000-07-01')),
'08' => date($key, strtotime('2000-08-01')),
'09' => date($key, strtotime('2000-09-01')),
'10' => date($key, strtotime('2000-10-01')),
'11' => date($key, strtotime('2000-11-01')),
'12' => date($key, strtotime('2000-12-01'))
];
}

Expand Down
2 changes: 1 addition & 1 deletion src/Models/RecurringDayOfWeek.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function requireDefaultRecords()

public function getTitle()
{
return strftime("%a", Carbon::now()->next($this->Value)->getTimestamp());
return date("D", Carbon::now()->next($this->Value)->getTimestamp());
}


Expand Down