ui/build/month-picker/months
ui/build/month-picker/months
Type Aliases
MonthKey
type MonthKey = string;Defined in: apps/website/.api-docs-entry/ui/build/month-picker/months.d.ts:1
MonthRange
type MonthRange = Readonly<{
end: MonthKey;
start: MonthKey;
}>;Defined in: apps/website/.api-docs-entry/ui/build/month-picker/months.d.ts:2
MonthRangePreset
type MonthRangePreset = "thisYear" | "lastYear" | "lastSixMonths" | "lastTwelveMonths";Defined in: apps/website/.api-docs-entry/ui/build/month-picker/months.d.ts:20
Variables
addMonths
const addMonths: (key, count) => MonthKey;Defined in: apps/website/.api-docs-entry/ui/build/month-picker/months.d.ts:13
Parameters
| Parameter | Type |
|---|---|
key |
MonthKey |
count |
number |
Returns
clampMonth
const clampMonth: (key, min?, max?) => MonthKey;Defined in: apps/website/.api-docs-entry/ui/build/month-picker/months.d.ts:16
Parameters
| Parameter | Type |
|---|---|
key |
MonthKey |
min? |
MonthKey |
max? |
MonthKey |
Returns
compareMonths
const compareMonths: (left, right) => number;Defined in: apps/website/.api-docs-entry/ui/build/month-picker/months.d.ts:15
Negative when left is earlier, zero when equal, positive when later.
Parameters
| Parameter | Type |
|---|---|
left |
MonthKey |
right |
MonthKey |
Returns
number
currentMonthKey
const currentMonthKey: (now?) => MonthKey;Defined in: apps/website/.api-docs-entry/ui/build/month-picker/months.d.ts:12
Parameters
| Parameter | Type |
|---|---|
now? |
Date |
Returns
isMonthKey
const isMonthKey: (value) => value is MonthKey;Defined in: apps/website/.api-docs-entry/ui/build/month-picker/months.d.ts:6
Parameters
| Parameter | Type |
|---|---|
value |
unknown |
Returns
value is MonthKey
MONTH_RANGE_PRESETS
const MONTH_RANGE_PRESETS: readonly MonthRangePreset[];Defined in: apps/website/.api-docs-entry/ui/build/month-picker/months.d.ts:23
monthKeyOf
const monthKeyOf: (year, month) => MonthKey;Defined in: apps/website/.api-docs-entry/ui/build/month-picker/months.d.ts:11
Parameters
| Parameter | Type |
|---|---|
year |
number |
month |
number |
Returns
monthLabel
const monthLabel: (locale, key, month?) => string;Defined in: apps/website/.api-docs-entry/ui/build/month-picker/months.d.ts:17
Parameters
| Parameter | Type |
|---|---|
locale |
string |
key |
MonthKey |
month? |
"short" | "long" |
Returns
string
monthNames
const monthNames: (locale, month?) => string[];Defined in: apps/website/.api-docs-entry/ui/build/month-picker/months.d.ts:18
Parameters
| Parameter | Type |
|---|---|
locale |
string |
month? |
"short" | "long" |
Returns
string[]
monthRangePreset
const monthRangePreset: (preset, now?) => MonthRange;Defined in: apps/website/.api-docs-entry/ui/build/month-picker/months.d.ts:22
The spans a reporting surface asks for by name, anchored on the month now falls in.
Parameters
| Parameter | Type |
|---|---|
preset |
MonthRangePreset |
now? |
Date |
Returns
parseMonth
const parseMonth: (key) => Readonly<{
month: number;
year: number;
}>;Defined in: apps/website/.api-docs-entry/ui/build/month-picker/months.d.ts:7
Parameters
| Parameter | Type |
|---|---|
key |
MonthKey |
Returns
Readonly<{
month: number;
year: number;
}>
rangeLabel
const rangeLabel: (locale, range) => string;Defined in: apps/website/.api-docs-entry/ui/build/month-picker/months.d.ts:19
Parameters
| Parameter | Type |
|---|---|
locale |
string |
range |
MonthRange |
Returns
string