C2W4 - Convert timestamps into periodic signals


I couldn’t find any.
Could anyone point me towards a tutorial or anything that might help me get acquainted with the timestamp conversion concept introduced in the Feature Engineering with Weather Data lab ?

It says :
a simple approach to generate a periodic signal is to use sine and cosine to convert the timestamp to clear "Time of day" ( Day sin,Day cos) and "Time of year" (Year sin,Year cos ) signals.

  # Convert timestamps into periodic signals
  outputs['Day sin'] = tf.math.sin(timestamp_s * (2 * pi / day))
  outputs['Day cos'] = tf.math.cos(timestamp_s * (2 * pi / day))
  outputs['Year sin'] = tf.math.sin(timestamp_s * (2 * pi / year))
  outputs['Year cos'] = tf.math.cos(timestamp_s * (2 * pi / year))

I’m lost here.

I kept digging and came accross this reference here which I like :