Skip to content
Merged
Changes from all commits
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
4 changes: 4 additions & 0 deletions src/Enum/DateTimePlus/FormatWithTimezone.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,15 @@ enum FormatWithTimezone: string
/** ex: 'Saturday, 01-Jan-2022 12:00:00 GMT+0000'; */
case COOKIE = 'COOKIE';

/** ex: 022-01-01T12:00:00.000+00:00 */
case RFC3339_EXTENDED = 'RFC3339_EXTENDED';

public function pattern(): string
{
return match ($this) {
self::ATOM => 'Y-m-d\TH:i:sP',
self::COOKIE => 'l, d-M-Y H:i:s T',
self::RFC3339_EXTENDED => 'Y-m-d\TH:i:s.vP',
};
}
}