Skip to content

1.0.0

Choose a tag to compare

@Jeomhps Jeomhps released this 15 Sep 20:08
· 10 commits to main since this release

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

⚡ 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

  1. Update your import:
    #import "@preview/datify:1.0.0": *
  2. Migrate standalone functions to datify-core.
  3. Wrap literal text in quotes (').