Skip to content

Releases: Jeomhps/datify

1.0.1

01 Feb 01:02

Choose a tag to compare

Datify v1.0.1 Released!

Fixed incorrect parsing of yy token, which previously produced 20262026 instead of 2026. Added a new token and updated the .typ file formatting. Added corresponding test cases for the short pattern.

1.0.0

15 Sep 20:08

Choose a tag to compare

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 (').

Datify: v0.1.4

25 May 01:58

Choose a tag to compare

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

31 Oct 20:59
c8ec3c7

Choose a tag to compare

Release v0.1.3

What's Changed

  • Add support for spanish "es" locale by @Nyveon in #2
  • Added Portuguese Language Support by @bpkleer in #3

New Contributors

  • @Nyveon made their first contribution in #2
  • @bpkleer made their first contribution in #3

Full Changelog: v0.1.2...v0.1.3

Datify: v0.1.2

30 May 20:16

Choose a tag to compare

Release v0.1.2

New Features

  • Custom Date Format Function: Introduced the custom-date-format function. 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-name and day-name Functions:

    • 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:
      #day-name(1, "fr", true)
      Instead of:
      #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.