All Downloads are FREE. Search and download functionalities are using the official Maven repository.

components.gantt.utils.date.ts Maven / Gradle / Ivy

import { Moment, isMoment } from "moment";

export function mformat(aMoment: Moment): String {
  if (isMoment(aMoment))
    return aMoment.format('LLLL ([week] WW)')
  else
    return 'invalid moment'
}

export function setToStartOfWeek(aMoment: Moment): Moment {
  return aMoment.startOf("isoWeek").startOf("day");
};

export function setToStartOfNextWeek(aMoment: Moment): Moment {
  return aMoment.endOf("isoWeek").add(1, "day").startOf("day");
};




© 2015 - 2024 Weber Informatics LLC | Privacy Policy