-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
always get next birthday and new years dates for automatic countdowns…
…, refactor utils, formats and language stuff.
- Loading branch information
Showing
6 changed files
with
146 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// src/utils/dates.ts | ||
export const getNextBirthday = () => { | ||
const today = new Date(); | ||
const year = today.getFullYear() + (today.getMonth() > 0 || 1 ? 1 : 0); | ||
return new Date(`${year}-01-16T00:00:00`); | ||
}; | ||
|
||
export const getNextNewYears = () => { | ||
const today = new Date(); | ||
const year = today.getFullYear() + 1; | ||
return new Date(`${year}-01-01T00:00:00`); | ||
}; | ||
|
||
export const getNextYearValue = () => { | ||
return new Date().getFullYear() + 1; | ||
}; | ||
|
||
export const formatMonthYear = (date: Date, locale: string): string => { | ||
return new Intl.DateTimeFormat(locale, { month: "long", year: "numeric" }) | ||
.format(date); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import { getNextYearValue } from "../dates.ts"; | ||
|
||
export default { | ||
name: "Emre Yurtseven", | ||
profession: "App Developer", | ||
bornInfo: "Born on January 16, 2002 • B.Sc. Computer Science", | ||
experience: "Experience", | ||
projects: "Projects", | ||
woautoDesc: "Never lose sight of your car parking ever again.", | ||
parenDesc: | ||
"Enjoy your vacation and keep the local currency ready at your fingertips.", | ||
email: "Email", | ||
telegram: "Telegram", | ||
github: "GitHub", | ||
copyright: "© 2020 - ", | ||
impressum: "Impressum", | ||
datenschutz: "Datenschutzerklärung", | ||
countdownLabels: [ | ||
"New Year " + getNextYearValue(), | ||
"Birth Day from Emre", | ||
"Ramadan 2025", | ||
], | ||
programmingItems: [ | ||
"Flutter 4+ years", | ||
"Android & iOS Development", | ||
"Python 2+ years", | ||
"JavaScript / TypeScript - React, Next.js and Fresh", | ||
"PHP", | ||
], | ||
languageItems: [ | ||
"German (Deutsch) - Native", | ||
"Turkish (Türkçe) - Casual / Native", | ||
"English - Professional", | ||
"Japanese (日本語) - Beginner", | ||
], | ||
programmingSkills: "Programming Skills", | ||
languageSkills: "Language Skills", | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import { getNextYearValue } from "../dates.ts"; | ||
|
||
export default { | ||
name: "エムレ・ユルトセヴェン", | ||
profession: "アプリ開発者", | ||
bornInfo: "2002年1月16日生まれ • コンピュータサイエンス学士", | ||
experience: "経験", | ||
projects: "プロジェクト", | ||
woautoDesc: "駐車した場所を二度と見失いません。", | ||
parenDesc: "休暇を楽しみ、現地通貨を手元に簡単に管理しましょう。", | ||
email: "メール", | ||
telegram: "テレグラム", | ||
github: "ギットハブ", | ||
copyright: "© 2020 - ", | ||
impressum: "インプリント", | ||
datenschutz: "データ保護方針", | ||
countdownLabels: [ | ||
getNextYearValue() + "年の新年", | ||
"エムレの誕生日", | ||
"ラマダン2025", | ||
], | ||
programmingItems: [ | ||
"Flutter 4年以上", | ||
"AndroidおよびiOS開発", | ||
"Python 2年以上", | ||
"JavaScript / TypeScript - React、Next.js、Fresh", | ||
"PHP", | ||
], | ||
languageItems: [ | ||
"ドイツ語 (Deutsch) - ネイティブ", | ||
"トルコ語 (Türkçe) - カジュアル / ネイティブ", | ||
"英語 - プロフェッショナル", | ||
"日本語 - 初級", | ||
], | ||
programmingSkills: "プログラミングスキル", | ||
languageSkills: "言語スキル", | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { Translations } from "../types.ts"; | ||
import enTranslation from "./en.ts"; | ||
import jaTranslation from "./ja.ts"; | ||
const translations: Translations = { | ||
en: enTranslation, | ||
ja: jaTranslation, | ||
}; | ||
|
||
export default translations; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
export type Locale = "en" | "ja"; | ||
|
||
export type Translations = { | ||
[key: string]: { | ||
name: string; | ||
profession: string; | ||
bornInfo: string; | ||
experience: string; | ||
projects: string; | ||
woautoDesc: string; | ||
parenDesc: string; | ||
email: string; | ||
telegram: string; | ||
github: string; | ||
copyright: string; | ||
impressum: string; | ||
datenschutz: string; | ||
countdownLabels: string[]; | ||
programmingSkills: string; | ||
languageSkills: string; | ||
programmingItems: string[]; | ||
languageItems: string[]; | ||
}; | ||
}; |