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

gw.util.time.CoreZoneIdEnhancement.gsx Maven / Gradle / Ivy

There is a newer version: 1.18.2
Show newest version
package gw.util.time

uses java.time.LocalDateTime
uses java.time.ZonedDateTime
uses java.time.ZoneId
uses gw.util.science.Time

enhancement CoreZoneIdEnhancement : ZoneId
{
  function postfixBind( time: Time ) : HourMinuteSecondMilliZone {
    var hour = time.toNumber( Hour ) as int
    var minute = (time - new Time( hour, Hour )).to( Minute ) as int
    var second = (time - new Time( hour, Hour ) - new Time( minute, Minute )).to( Second ) as int
    var milli = (time - new Time( hour, Hour ) - new Time( minute, Minute ) - new Time( second, Second )).to( Milli ) as int
    return new( this, hour, minute, second, milli )
  }

  function postfixBind( hour: Integer ) : HourZone {
    return new( this, hour )
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy