MCPcopy Create free account
hub / github.com/hashintel/hash / intervalForTimestamp

Function intervalForTimestamp

libs/@blockprotocol/graph/src/stdlib/interval.ts:54–67  ·  view source on GitHub ↗
(
  timestamp: Timestamp,
)

Source from the content-addressed store, hash-verified

52 * @param {Timestamp} timestamp
53 */
54export const intervalForTimestamp = (
55 timestamp: Timestamp,
56): TemporalInterval<ClosedTemporalBound, ClosedTemporalBound> => {
57 return {
58 start: {
59 kind: "inclusive",
60 limit: timestamp,
61 },
62 end: {
63 kind: "inclusive",
64 limit: timestamp,
65 },
66 };
67};
68
69/**
70 * Checks whether two given {@link TimeInterval}s are adjacent to one another, where adjacency is defined as

Callers 8

getAvatarForEntityFunction · 0.90
AuthInfoProviderFunction · 0.90
constructUserFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected