MCPcopy Create free account
hub / github.com/Effect-TS/effect / toString

Method toString

packages/effect/src/unstable/cli/Prompt.ts:1985–2002  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1983 }
1984
1985 override toString() {
1986 const date = this.date.getDate()
1987 const day = this.date.getDay()
1988 switch (this.token) {
1989 case "DD":
1990 return `${date}`.padStart(2, "0")
1991 case "Do":
1992 return `${date}${this.ordinalIndicator(date)}`
1993 case "d":
1994 return `${day + 1}`
1995 case "ddd":
1996 return this.locales!.weekdaysShort[day]!
1997 case "dddd":
1998 return this.locales!.weekdays[day]!
1999 default:
2000 return `${date}`
2001 }
2002 }
2003
2004 private ordinalIndicator(day: number): string {
2005 if (day >= 11 && day <= 13) {

Callers

nothing calls this directly

Calls 1

ordinalIndicatorMethod · 0.95

Tested by

no test coverage detected