Releases: Jeomhps/datify
Releases · Jeomhps/datify
1.0.1
1.0.0
Datify v1.0.0 Released! 🎉
Major Changes & Improvements
This release is a complete rewrite of Datify, introducing breaking changes and powerful new features.
🔄 API Migration to datify-core
- Functions like
day-name,month-name, and other standalone utilities have been moved to datify-core.
Migration example:#import "@preview/datify-core:1.0.0": * #get-day-name(datetime.today(), lang: "en") // Now in datify-core
🌍 Hundreds of Locales via Unicode CLDR
- Datify now uses the Unicode CLDR project as its locale data source.
- Supports hundreds of languages out of the box, including right-to-left scripts, complex calendars, and regional formats.
- See the full list of supported locales.
⚡ Formal Language & Automata-Based Parsing
- The new backend uses language theory and automata for token replacement, ensuring:
- Robust parsing of date patterns.
- Predictable behavior for custom formats.
- Future-proof syntax for complex use cases.
📝 Safe Literal Text with Quoting
- You can now embed raw text in patterns without fear of misinterpretation by wrapping it in single quotes (
').#custom-date-format(mydate, pattern: "'Today is' EEEE") // Today is Sunday #custom-date-format(mydate, pattern: "yyyy'/'MM'/'dd") // 2025/01/05
⚠️ Always quote literals to avoid ambiguity and ensure compatibility with future versions.
📅 CLDR Named Patterns
- Use standard CLDR pattern names (
"full","long","medium","short") for locale-aware formatting:#custom-date-format(mydate, pattern: "full", lang: "fr") // dimanche 5 janvier 2025
⚠️ Breaking Changes
- Old API is incompatible with v1.0.0+.
- Update your code if you were using
day-name,month-name, or similar functions directly. - Quoting literals is now strongly encouraged (unquoted text may behave unexpectedly).
Why Upgrade?
✅ More locales (hundreds, thanks to CLDR).
✅ More reliable parsing (automata-based engine).
✅ Safer literal text handling (quotes ensure correctness).
✅ Modern architecture (built on datify-core).
How to Update
- Update your import:
#import "@preview/datify:1.0.0": *
- Migrate standalone functions to
datify-core. - Wrap literal text in quotes (
').
Datify: v0.1.4
Release v0.1.4
What's Changed
- @danielFHcode added support for Hebrew in #4 and fixed bug for non-latin characters.
- Added support for Russian by @pantlmn in #8.
- Added support for Catalan by @Xexio15 in #11.
- @florian-obernberger Added support for Austrian in #13 and fixed the type check that was depecrated in #14.
- @Jojodicus has introduced a new format: the short day format. This allows users to write a one-digit day or month instead of the two-digit version. For example, "05" in the short day format becomes simply "5" (#19).
- Added support for Dutch by @junotvd in #20.
Full Changelog: v0.1.3...v0.1.4
Sorry for the wait, but I hope that these updates will help everyone !
Datify: v0.1.3
Datify: v0.1.2
Release v0.1.2
New Features
- Custom Date Format Function: Introduced the
custom-date-formatfunction. This function takes a datetime type, a format string, and a language ISO code. It outputs the date in the specified format using the appropriate language. This allows for more flexible and localized date formatting.
Improvements
-
Enhanced
month-nameandday-nameFunctions:- These functions have been rewritten to include an arguments sink. This enhancement simplifies their usage, allowing you to specify the language and other options directly without using named parameters.
- Example usage:
Instead of:
#day-name(1, "fr", true)
#day-name(1, lang: "fr", upper: true)
-
Project Structure:
- The overall structure of the project has been significantly improved through modularization. This enhancement makes the codebase more organized and maintainable.
Tests
- Unit Tests:
- Added comprehensive tests to verify the functionality of all implemented features.