Base functions are 2kB if gzipped and 7kB if minified. … I did create a TW development structure at 3rd of May, but did not have time to iron out which functions to expose.
dayjs uses a plugin mechanism to implement functions needed for specific usecases. So the size will be significantly bigger if every possible plugin is added.
Especially internationalisation with all available languages will make it huge. TW has it’s own language switching, so it would be nice if it could be reused, instead of adding a lot of duplicated strings.
I did read the documentation once, but probably forgot most of it already
- Base size minified is 7kB
- All plugins minified are ~ 34kB
- All 145 locales are 200kB
- I personally would limit the first version to the existing UI translations we do have already
So the initial library size may be more like 50-60kByte minified. Plus TW wrappers, we may end up close to 100kByte for the plugin. Imo that’s still small enough for a plugin I personally would use.
The function I wanted to start with is the calendar-plugin + all dependencies it needs. So we could have a TW calendar widget, that is consistent with different browsers. The native browser calendars are not flexible enough for styling and look different in every browser.
I do like the calendar, that was developed for projectify. Some code may be borrowed from there.
Then there should be some abstract date-calculations like
- Tomorrow
- In x Day(s) / Week(s) / Month(s) / Year(s)
- The second Tuesday every month/quarter/year (if it’s easy to implement)
- Days till
<date>
- Add / subtract Dates
- …
just some thoughts
-m