Getting (say) the month from a gregor datetime

I like the work and thought that went into gregor. However, I can't figure out how to extract (say) the month from a datetime without doing something crazy like comparing the date to the first of each month. Even that seems impossible without first knowing the year. I hope I'm missing something obvious?

Closest thing is probably period-ref, which takes a period, not a datetime.

Oh, there's also ->month, which takes a date-provider

2 Likes

Ugh, it's right there! How did I spend 5 minutes in those docs and not find it?

...

I wonder how hard it would be to generate a package-specific index that just lists all of the names associated with the package ...

But actually, looking harder, I see that each page has a list much like I'm looking for, low down in the left column. Maybe my real issue is that the gregor docs are broken into SO MANY subpages. Okay, anyway: got what I want, many many thanks!

Perhaps an Index would help. I generate one for
Frosthaven Manager with
@(index-section). It has more than just "exported bindings," but
it's quite helpful.

1 Like