API Reference

# Duration

Describing some time duration is surprisingly common in feature engineering workflows. Fennel lets you express durations in an easy to read natural language as described below

Signifier | Unit | |
---|---|---|

y | Year | |

w | Week | |

d | Day | |

h | Hour | |

m | Minute | |

s | Second |

Examples:

- "7h" -> 7 hours
- "12d" -> 12 days
- "2y" -> 2 years
- "3h 20m 4s" -> 3 hours 20 minutes and 4 seconds
- "2y 4w" -> 2 years and 4 weeks

Info

A year is not a fixed amount of time but is hardcoded to be exactly 365 days

Note that there is no shortcut for month because there is a very high degree of variance in month's duration- some months are 28 days, some are 30 days and some are 31 days. A common convention in feature engineering is to use `4 weeks`

to describe a month.