Skip to content

Commit

Permalink
fix: default patterns
Browse files Browse the repository at this point in the history
  • Loading branch information
BernhardBaumrock committed Jun 13, 2023
1 parent 2936a28 commit 46fd518
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 5 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/releases.yml
@@ -0,0 +1,27 @@
name: Releases
on:
push:
branches:
- main

jobs:
changelog:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: conventional Changelog Action
id: changelog
uses: TriPSs/conventional-changelog-action@v3.18.0
with:
github-token: ${{ secrets.github_token }}

- name: create release
uses: actions/create-release@v1
if: ${{ steps.changelog.outputs.skipped == 'false' }}
env:
GITHUB_TOKEN: ${{ secrets.github_token }}
with:
tag_name: ${{ steps.changelog.outputs.tag }}
release_name: ${{ steps.changelog.outputs.tag }}
body: ${{ steps.changelog.outputs.clean_changelog }}
10 changes: 5 additions & 5 deletions HumanDates.php
Expand Up @@ -5,16 +5,16 @@ class HumanDates
/* default range patterns */
const rangePatterns = [
// 1. Jan. 2023 - 3. Feb. 2024
'default' => ['d. LLL. Y', ' – ', 'd. LLL. Y'],
'default' => ['d. MMM. y', ' – ', 'd. MMM. y'],

// 1. Jan. - 3. Feb. 2023
'sameYear' => ['d. LLL.', ' – ', 'd. LLL. Y'],
'sameYear' => ['d. MMM.', ' – ', 'd. MMM. y'],

// 1. - 3. Jan. 2023
'sameMonth' => ['d.', ' – ', 'd. LLL. Y'],
'sameMonth' => ['d.', ' – ', 'd. MMM. y'],

// 1. Jan. 2023
'sameDay' => ['d. LLL. Y', '', ''],
'sameDay' => ['d. MMM. y', '', ''],
];

/** @var IntlDateFormatter */
Expand All @@ -24,7 +24,7 @@ class HumanDates

function __construct(
$locale = "en_GB",
$format = "d. MMM Y",
$format = "d. MMM y",
$patterns = null,
) {
$this->setPatterns($patterns);
Expand Down

0 comments on commit 46fd518

Please sign in to comment.