Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[Import/Export] Format an instant in an IANA timezone

オープン 初心者向け
#830 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
72/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
typescript
領域
web-dev

調査の方向性

src/lib/ics/dateTime.ts から始めてください。このファイルは前提作業 #788 で作成または拡張される予定です。出発点の例として src/lib/domain/section.ts を読んでください。明示的な timeZone を指定して Intl.DateTimeFormat を使う formatInstant(date, timeZone) を追加し、src/lib/ics/dateTime.test.ts が New_York と UTC の例および無効なタイムゾーンを扱っていることを確認してください。pnpm test -- src/lib/ics/dateTime.test.ts、pnpm lint、pnpm typecheck がすべて成功すれば完了です。

索引モデルが issue の本文から書いたものです。

説明

import-export

What to build

Format one exact moment using an explicitly chosen timezone. Calendar export must use that choice rather than the timezone or language settings of the contributor’s computer.

Files

  • src/lib/ics/dateTime.ts (extend the prerequisite’s file)
  • Starting example: src/lib/domain/section.ts
    Code to add or extend: formatInstant(date: Date, timeZone: string): string.

Steps

  1. Use Intl.DateTimeFormat with explicit timeZone, numeric date/time parts and hourCycle h23.
  2. Assemble formatToParts output using the existing formatter; append Z only when output timezone is UTC.
  3. Let an invalid IANA zone yield a clear error; do not rely on the computer locale.

Example

Date 2026-08-12T13:10:00Z/New_York → 20260812T091000; UTC → 20260812T131000Z.

Check it works

In src/lib/ics/dateTime.test.ts, check the example above and the failure or limit described in the steps. Run pnpm test -- src/lib/ics/dateTime.test.ts, pnpm lint and pnpm typecheck.

Before starting

  • #788 — Format local calendar date and time

References

Assign yourself before starting, or comment to claim the issue. Project setup.

主要言語
TypeScript
スター
19
フォーク
94
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

DevDogsUGA/DogDays のほかの issue

DevDogsUGA/DogDays の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。