Skip to content

Commit

Permalink
Fix: ファイル名パターンのmonthが1月ズレているのを修正 (#2343)
Browse files Browse the repository at this point in the history
  • Loading branch information
sevenc-nanashi authored Nov 6, 2024
1 parent 6355ee9 commit 3b6bd19
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/build_preview_pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ on:
pull_request:

jobs:
update_pages:
# このJobの名前を変更したときは、voicevox/preview-pages側のscripts/collect.tsも変更すること。
build_preview_pages:
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -22,8 +23,8 @@ jobs:

- name: Build
run: |
npm run storybook:build -- --preview-url ./ --output-dir dist_preview/storybook
npm run browser:build -- --base ./ --outDir dist_preview/editor
npm run storybook:build -- --output-dir $(pwd)/dist_preview/storybook
npm run browser:build -- --base ./ --outDir $(pwd)/dist_preview/editor
- name: Upload artifact
uses: actions/upload-artifact@v4
Expand Down
3 changes: 2 additions & 1 deletion src/store/utility.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,8 @@ const DEFAULT_SONG_AUDIO_FILE_NAME_VARIABLES = {
export function currentDateString(): string {
const currentDate = new Date();
const year = currentDate.getFullYear();
const month = currentDate.getMonth().toString().padStart(2, "0");
// NOTE: getMonth()は0から始まるので1を足す
const month = (currentDate.getMonth() + 1).toString().padStart(2, "0");
const date = currentDate.getDate().toString().padStart(2, "0");

return `${year}${month}${date}`;
Expand Down

0 comments on commit 3b6bd19

Please sign in to comment.