bjuppa / com-plain-date

JavaScript date-time utilities that keep timezones on the surface
https://deno.land/x/complaindate/mod.ts
MIT License
1 stars 0 forks source link

Change prefix of plain-date-navigating utils (e.g. addDays => jumpDays) #58

Closed bjuppa closed 1 year ago

bjuppa commented 1 year ago

The functions that navigate from a plain-date to another are currently named with the add prefix, but they don't really "add" per se, they can also subtract if the argument is negative.

Would it make sense to change their prefix to jump, e.g. jumpDays?

Does "jump" sound to silly? I think navigate is too long and move is a bit boring.

...but not addTime, because it actually does move specifically forward and has a reverse function subtractTime.

(also, it seems ExPlainDate only has 4 of those navigators... addQuarters is missing)

bjuppa commented 1 year ago

leap, hop, shift, slide, step, skip?

"add" may actually be the best option still 🤷 At least it's very short!

bjuppa commented 1 year ago

After looking at these options I think "add" still makes most sense! Let's not hold back releasing 1.0.