Beispiel #1
0
 def __call__(self, args):
     value = self.get_value(self.value, args)
     year = timecore.unit(td.unit.year)
     se = timecore.unit(td.unit.season)
     st_m = 1 + (se-1) * 3
     ed_m = st_m + 2
     month = ed_m if self.end else st_m
     return tf.delta_time(tf.time_vector(year=year, month=month), td.unit.season, value)
Beispiel #2
0
 def __call__(self, args):
     value = self.get_value(self.value, args)
     shift = self.get_value(self.shift, args)
     vector = tf.weekday_vector(timecore.vector, value)
     vector = tf.delta_time(vector, td.unit.week, shift)
     return tf.keep_vector(vector, td.unit.day)
Beispiel #3
0
 def __call__(self, args):
     value = self.get_value(self.value, args)
     vector = tf.delta_time(timecore.vector, self.unit, value)
     return tf.keep_vector(vector, self.unit)
Beispiel #4
0
 def __call__(self, args):
     value = self.get_value(self.value, args)
     return tf.delta_time(timecore.vector, self.unit, self.value)