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

Method ordinalIndicator

packages/effect/src/unstable/cli/Prompt.ts:2004–2018  ·  view source on GitHub ↗
(day: number)

Source from the content-addressed store, hash-verified

2002 }
2003
2004 private ordinalIndicator(day: number): string {
2005 if (day >= 11 && day <= 13) {
2006 return "th"
2007 }
2008 switch (day % 10) {
2009 case 1:
2010 return "st"
2011 case 2:
2012 return "nd"
2013 case 3:
2014 return "rd"
2015 default:
2016 return "th"
2017 }
2018 }
2019}
2020
2021class Month extends DatePart {

Callers 1

toStringMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected