MCPcopy Index your code
hub / github.com/formatjs/formatjs / mod

Function mod

packages/ecma262-abstract/DateOperations.ts:3–5  ·  view source on GitHub ↗
(x: number, y: number)

Source from the content-addressed store, hash-verified

1const MS_PER_DAY = 86400000
2
3function mod(x: number, y: number): number {
4 return x - Math.floor(x / y) * y
5}
6
7export function Day(t: number): number {
8 return Math.floor(t / MS_PER_DAY)

Callers 5

WeekDayFunction · 0.85
HourFromTimeFunction · 0.85
MinFromTimeFunction · 0.85
SecFromTimeFunction · 0.85
msFromTimeFunction · 0.85

Calls 1

floorMethod · 0.80

Tested by

no test coverage detected