| import { he as dateFnsHe } from "date-fns/locale"; |
|
|
| import type { DateLibOptions, DayPickerLocale } from "../classes/DateLib.js"; |
| import { DateLib } from "../classes/DateLib.js"; |
| import type { Modifiers } from "../types/index.js"; |
|
|
| |
| export const he: DayPickerLocale = { |
| ...dateFnsHe, |
| labels: { |
| labelDayButton: ( |
| date: Date, |
| modifiers: Modifiers, |
| options?: DateLibOptions, |
| dateLib?: DateLib, |
| ) => { |
| const lib = dateLib ?? new DateLib(options); |
| let label = lib.format(date, "PPPP"); |
| if (modifiers.today) label = `讛讬讜诐, ${label}`; |
| if (modifiers.selected) label = `${label}, 谞讘讞专`; |
| return label; |
| }, |
| labelMonthDropdown: "讘讞专 讗转 讛讞讜讚砖", |
| labelNext: "注讘讜专 诇讞讜讚砖 讛讘讗", |
| labelPrevious: "注讘讜专 诇讞讜讚砖 讛拽讜讚诐", |
| labelWeekNumber: (weekNumber: number) => `砖讘讜注 ${weekNumber}`, |
| labelYearDropdown: "讘讞专 讗转 讛砖谞讛", |
| labelGrid: (date: Date, options?: DateLibOptions, dateLib?: DateLib) => |
| (dateLib ?? new DateLib(options)).formatMonthYear(date), |
| labelGridcell: ( |
| date: Date, |
| modifiers?: Modifiers, |
| options?: DateLibOptions, |
| dateLib?: DateLib, |
| ) => { |
| const lib = dateLib ?? new DateLib(options); |
| let label = lib.format(date, "PPPP"); |
| if (modifiers?.today) { |
| label = `讛讬讜诐, ${label}`; |
| } |
| return label; |
| }, |
| labelNav: "住专讙诇 谞讬讜讜讟", |
| labelWeekNumberHeader: "诪住驻专 砖讘讜注", |
| labelWeekday: (date: Date, options?: DateLibOptions, dateLib?: DateLib) => |
| (dateLib ?? new DateLib(options)).format(date, "cccc"), |
| }, |
| }; |
|
|