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

org.apache.pekko.extension.quartz.QuartzCalendars.scala Maven / Gradle / Ivy

The newest version!
package org.apache.pekko.extension.quartz

import com.typesafe.config.{ Config, ConfigException, ConfigObject }
import java.util.TimeZone
import scala.util.control.Exception._
import org.quartz.{ Calendar, CronExpression }
import org.quartz.impl.calendar._

import scala.collection.JavaConverters._
import java.text.{ ParseException, SimpleDateFormat }
import collection.immutable

/**
 * Utility classes around the creation and configuration of Quartz Calendars. All dates must be ISO-8601 compliant.
 */
object QuartzCalendars {
  // TODO - Support a default / "Base" calendar.
  // type (of enum list)
  // timezone (parseable) [optional, defaults to UTC]
  // description (string)

  /* annual
   *   excludes a set of days of the year
   *   e.g. bank holidays which are on same date every year
   *   doesn't take year into account, but can't calculate moveable feasts.
   *   i.e. you can specify "christmas" (always december 25) and it will get every christmas,
   *   but not "Easter" (which is calculated based on the first full moon on or after the spring equinox)
   */
  // excludeDates (list of MM-DD dates)

  /* holiday
   *  excludes full specified day, with the year taken into account
   */
  // excludeDates (list of ISO-8601 dates, YYYY-MM-DD)

  /* daily
   *  excludes a specified time range each day. cannot cross daily boundaries.
   *  only one time range PER CALENDAR.
   */
  // exclude block {
  //    startTime = 




© 2015 - 2025 Weber Informatics LLC | Privacy Policy