ChronVer
import { ChronVer } from "jsr:@ende/chronver";interface
interface ChronVerA ChronVer object parsed into its constituent parts.
A ChronVer string has the format YYYY.MM.DD[.CHANGESET][-FEATURE|-break].
Example: Usage
import type { ChronVer } from "@ende/chronver/types";
import { format } from "@ende/chronver/format";
import { assertEquals } from "@ende/assert";
const version: ChronVer = {
year: 2024,
month: 4,
day: 3,
changeset: 1,
isBreaking: false
};
assertEquals(format(version), "2024.04.03.1");
Properties
year
year: numberThe year
month
month: numberThe month, from 1 to 12
day
day: numberThe day of the month, from 1 to 31
changeset
changeset: numberThe changeset number, 0 if not specified
feature
feature?: stringThe feature name, if specified
isBreaking
isBreaking: booleanWhether this is a breaking change (-break)