MCPcopy
hub / github.com/Effect-TS/effect / ordinalIndicator

Method ordinalIndicator

packages/cli/src/internal/prompt/date.ts:556–563  ·  view source on GitHub ↗
(day: number)

Source from the content-addressed store, hash-verified

554 }
555
556 private ordinalIndicator(day: number): string {
557 return Match.value(day % 10).pipe(
558 Match.when(1, () => "st"),
559 Match.when(2, () => "nd"),
560 Match.when(3, () => "rd"),
561 Match.orElse(() => "th")
562 )
563 }
564}
565
566class Month extends DatePart {

Callers 1

toStringMethod · 0.95

Calls 2

pipeMethod · 0.65
valueMethod · 0.45

Tested by

no test coverage detected