get time and date using cron expression in golang

Viewed 713

i'm currently looking for a solution for sometimes now, i have this cron expression

time := '0 3,10,16,22 * * ?'

and i need to parse this into date and compare it to get a result

what my goal is to get time data from the time var and compare it, if the time is not in between 00:00 and 00:06 it will return bool false

i understand for comparison i can use if clause but,

how to parse this cron expression and turn it into date solution were not found yet. i've been reading cron package in godoc for sometimes and dont find it yet maybe i'm missing something?

any kind of solution or input were appreciated thanks!

1 Answers
Related