Laravel for Rust Alpha

laravel-rust-format

Laravel's formatting, byte for byte, in Rust.

Keep the same slugs, labels, amounts and dates when you move code or templates from PHP Laravel to Laravel for Rust. Rust's format!("{:.2}", 1.005) prints 1.00; PHP's number_format(1.005, 2) prints 1.01, and so does this crate.

Read the docs Source on GitHub

cargo add laravel-rust-format
Latest release
0.1.1, 2026-12-04
Maintenance
Active
Framework
laravel-rust 0.2.x
MSRV
Rust 1.99 or later
Licence
MIT

PHP parity

Follows illuminate/support 13.39.0 (commit 3802ddec536f). Last verified .

Parity level
Core
Abilities
472
Covered
465
Diverged
4
Planned
3
PHP fixtures
133,206

Fixtures are generated by PHP itself: PHP 8.4.27, doctrine/inflector 2.1.1, illuminate/support 13.39.0, league/commonmark 2.10.7, nesbot/carbon 3.15.1, ramsey/uuid 4.9.4, symfony/uid 8.1.9, voku/portable-ascii 2.1.1.

Coverage by ability
  • carbon_calendar.add_centuries · Covered · 1 test
    Carbon calendar: add_centuries
  • carbon_calendar.add_centuries_no_overflow · Covered · 1 test
    Carbon calendar: add_centuries_no_overflow
  • carbon_calendar.add_centuries_with_overflow · Covered · 1 test
    Carbon calendar: add_centuries_with_overflow
  • carbon_calendar.add_days · Covered · 1 test
    Carbon calendar: add_days
  • carbon_calendar.add_decades · Covered · 1 test
    Carbon calendar: add_decades
  • carbon_calendar.add_decades_no_overflow · Covered · 1 test
    Carbon calendar: add_decades_no_overflow
  • carbon_calendar.add_decades_with_overflow · Covered · 1 test
    Carbon calendar: add_decades_with_overflow
  • carbon_calendar.add_hours · Covered · 1 test
    Carbon calendar: add_hours
  • carbon_calendar.add_microseconds · Covered · 1 test
    Carbon calendar: add_microseconds
  • carbon_calendar.add_millennia · Covered · 1 test
    Carbon calendar: add_millennia
  • carbon_calendar.add_millennia_no_overflow · Covered · 1 test
    Carbon calendar: add_millennia_no_overflow
  • carbon_calendar.add_millennia_with_overflow · Covered · 1 test
    Carbon calendar: add_millennia_with_overflow
  • carbon_calendar.add_milliseconds · Covered · 1 test
    Carbon calendar: add_milliseconds
  • carbon_calendar.add_minutes · Covered · 1 test
    Carbon calendar: add_minutes
  • carbon_calendar.add_months · Covered · 1 test
    Carbon calendar: add_months
  • carbon_calendar.add_months_no_overflow · Covered · 1 test
    Carbon calendar: add_months_no_overflow
  • carbon_calendar.add_months_with_overflow · Covered · 1 test
    Carbon calendar: add_months_with_overflow
  • carbon_calendar.add_quarters · Covered · 1 test
    Carbon calendar: add_quarters
  • carbon_calendar.add_quarters_no_overflow · Covered · 1 test
    Carbon calendar: add_quarters_no_overflow
  • carbon_calendar.add_quarters_with_overflow · Covered · 1 test
    Carbon calendar: add_quarters_with_overflow
  • carbon_calendar.add_seconds · Covered · 1 test
    Carbon calendar: add_seconds
  • carbon_calendar.add_span · Covered · 1 test
    Carbon calendar: add_span
  • carbon_calendar.add_unit · Covered · 1 test
    Carbon calendar: add_unit
  • carbon_calendar.add_weekdays · Covered · 1 test
    Carbon calendar: add_weekdays
  • carbon_calendar.add_weeks · Covered · 1 test
    Carbon calendar: add_weeks
  • carbon_calendar.add_years · Covered · 1 test
    Carbon calendar: add_years
  • carbon_calendar.add_years_no_overflow · Covered · 1 test
    Carbon calendar: add_years_no_overflow
  • carbon_calendar.add_years_with_overflow · Covered · 1 test
    Carbon calendar: add_years_with_overflow
  • carbon_calendar.age · Covered · 1 test
    Carbon calendar: age
  • carbon_calendar.average · Covered · 1 test
    Carbon calendar: average
  • carbon_calendar.between · Covered · 1 test
    Carbon calendar: between
  • carbon_calendar.between_excluded · Covered · 1 test
    Carbon calendar: between_excluded
  • carbon_calendar.between_included · Covered · 1 test
    Carbon calendar: between_included
  • carbon_calendar.century · Covered · 1 test
    Carbon calendar: century
  • carbon_calendar.closest · Covered · 1 test
    Carbon calendar: closest
  • carbon_calendar.copy · Covered · 1 test
    Carbon calendar: copy
  • carbon_calendar.day · Covered · 1 test
    Carbon calendar: day
  • carbon_calendar.day_of_week · Covered · 1 test
    Carbon calendar: day_of_week
  • carbon_calendar.day_of_week_iso · Covered · 1 test
    Carbon calendar: day_of_week_iso
  • carbon_calendar.day_of_year · Covered · 1 test
    Carbon calendar: day_of_year
  • carbon_calendar.days_in_month · Covered · 1 test
    Carbon calendar: days_in_month
  • carbon_calendar.days_in_quarter · Covered · 1 test
    Carbon calendar: days_in_quarter
  • carbon_calendar.days_in_year · Covered · 1 test
    Carbon calendar: days_in_year
  • carbon_calendar.decade · Covered · 1 test
    Carbon calendar: decade
  • carbon_calendar.diff_in_days · Covered · 1 test
    Carbon calendar: diff_in_days
  • carbon_calendar.diff_in_hours · Covered · 1 test
    Carbon calendar: diff_in_hours
  • carbon_calendar.diff_in_microseconds · Covered · 1 test
    Carbon calendar: diff_in_microseconds
  • carbon_calendar.diff_in_milliseconds · Covered · 1 test
    Carbon calendar: diff_in_milliseconds
  • carbon_calendar.diff_in_minutes · Covered · 1 test
    Carbon calendar: diff_in_minutes
  • carbon_calendar.diff_in_months · Covered · 1 test
    Carbon calendar: diff_in_months
  • carbon_calendar.diff_in_quarters · Covered · 1 test
    Carbon calendar: diff_in_quarters
  • carbon_calendar.diff_in_seconds · Covered · 1 test
    Carbon calendar: diff_in_seconds
  • carbon_calendar.diff_in_unit · Covered · 1 test
    Carbon calendar: diff_in_unit
  • carbon_calendar.diff_in_weekdays · Covered · 1 test
    Carbon calendar: diff_in_weekdays
  • carbon_calendar.diff_in_weekend_days · Covered · 1 test
    Carbon calendar: diff_in_weekend_days
  • carbon_calendar.diff_in_weeks · Covered · 1 test
    Carbon calendar: diff_in_weeks
  • carbon_calendar.diff_in_years · Covered · 1 test
    Carbon calendar: diff_in_years
  • carbon_calendar.dst · Covered · 1 test
    Carbon calendar: dst
  • carbon_calendar.end_of_century · Covered · 1 test
    Carbon calendar: end_of_century
  • carbon_calendar.end_of_day · Covered · 1 test
    Carbon calendar: end_of_day
  • carbon_calendar.end_of_decade · Covered · 1 test
    Carbon calendar: end_of_decade
  • carbon_calendar.end_of_hour · Covered · 1 test
    Carbon calendar: end_of_hour
  • carbon_calendar.end_of_millennium · Covered · 1 test
    Carbon calendar: end_of_millennium
  • carbon_calendar.end_of_millisecond · Covered · 1 test
    Carbon calendar: end_of_millisecond
  • carbon_calendar.end_of_minute · Covered · 1 test
    Carbon calendar: end_of_minute
  • carbon_calendar.end_of_month · Covered · 1 test
    Carbon calendar: end_of_month
  • carbon_calendar.end_of_quarter · Covered · 1 test
    Carbon calendar: end_of_quarter
  • carbon_calendar.end_of_second · Covered · 1 test
    Carbon calendar: end_of_second
  • carbon_calendar.end_of_unit · Covered · 1 test
    Carbon calendar: end_of_unit
  • carbon_calendar.end_of_week · Covered · 1 test
    Carbon calendar: end_of_week
  • carbon_calendar.end_of_week_on · Covered · 1 test
    Carbon calendar: end_of_week_on
  • carbon_calendar.end_of_year · Covered · 1 test
    Carbon calendar: end_of_year
  • carbon_calendar.eq · Covered · 1 test
    Carbon calendar: eq
  • carbon_calendar.farthest · Covered · 1 test
    Carbon calendar: farthest
  • carbon_calendar.first_of_month · Covered · 1 test
    Carbon calendar: first_of_month
  • carbon_calendar.first_of_quarter · Covered · 1 test
    Carbon calendar: first_of_quarter
  • carbon_calendar.first_of_year · Covered · 1 test
    Carbon calendar: first_of_year
  • carbon_calendar.gt · Covered · 1 test
    Carbon calendar: gt
  • carbon_calendar.gte · Covered · 1 test
    Carbon calendar: gte
  • carbon_calendar.hour · Covered · 1 test
    Carbon calendar: hour
  • carbon_calendar.is_birthday · Covered · 1 test
    Carbon calendar: is_birthday
  • carbon_calendar.is_current_century · Covered · 1 test
    Carbon calendar: is_current_century
  • carbon_calendar.is_current_day · Covered · 1 test
    Carbon calendar: is_current_day
  • carbon_calendar.is_current_decade · Covered · 1 test
    Carbon calendar: is_current_decade
  • carbon_calendar.is_current_hour · Covered · 1 test
    Carbon calendar: is_current_hour
  • carbon_calendar.is_current_microsecond · Covered · 1 test
    Carbon calendar: is_current_microsecond
  • carbon_calendar.is_current_millennium · Covered · 1 test
    Carbon calendar: is_current_millennium
  • carbon_calendar.is_current_millisecond · Covered · 1 test
    Carbon calendar: is_current_millisecond
  • carbon_calendar.is_current_minute · Covered · 1 test
    Carbon calendar: is_current_minute
  • carbon_calendar.is_current_month · Covered · 1 test
    Carbon calendar: is_current_month
  • carbon_calendar.is_current_quarter · Covered · 1 test
    Carbon calendar: is_current_quarter
  • carbon_calendar.is_current_second · Covered · 1 test
    Carbon calendar: is_current_second
  • carbon_calendar.is_current_unit · Covered · 1 test
    Carbon calendar: is_current_unit
  • carbon_calendar.is_current_week · Covered · 1 test
    Carbon calendar: is_current_week
  • carbon_calendar.is_current_year · Covered · 1 test
    Carbon calendar: is_current_year
  • carbon_calendar.is_end_of_day · Covered · 1 test
    Carbon calendar: is_end_of_day
  • carbon_calendar.is_end_of_day_with_interval · Covered · 1 test
    Carbon calendar: is_end_of_day_with_interval
  • carbon_calendar.is_end_of_day_with_precision · Covered · 1 test
    Carbon calendar: is_end_of_day_with_precision
  • carbon_calendar.is_friday · Covered · 1 test
    Carbon calendar: is_friday
  • carbon_calendar.is_future · Covered · 1 test
    Carbon calendar: is_future
  • carbon_calendar.is_last_century · Covered · 1 test
    Carbon calendar: is_last_century
  • carbon_calendar.is_last_day · Covered · 1 test
    Carbon calendar: is_last_day
  • carbon_calendar.is_last_decade · Covered · 1 test
    Carbon calendar: is_last_decade
  • carbon_calendar.is_last_hour · Covered · 1 test
    Carbon calendar: is_last_hour
  • carbon_calendar.is_last_microsecond · Covered · 1 test
    Carbon calendar: is_last_microsecond
  • carbon_calendar.is_last_millennium · Covered · 1 test
    Carbon calendar: is_last_millennium
  • carbon_calendar.is_last_millisecond · Covered · 1 test
    Carbon calendar: is_last_millisecond
  • carbon_calendar.is_last_minute · Covered · 1 test
    Carbon calendar: is_last_minute
  • carbon_calendar.is_last_month · Covered · 1 test
    Carbon calendar: is_last_month
  • carbon_calendar.is_last_of_month · Covered · 1 test
    Carbon calendar: is_last_of_month
  • carbon_calendar.is_last_quarter · Covered · 1 test
    Carbon calendar: is_last_quarter
  • carbon_calendar.is_last_second · Covered · 1 test
    Carbon calendar: is_last_second
  • carbon_calendar.is_last_unit · Covered · 1 test
    Carbon calendar: is_last_unit
  • carbon_calendar.is_last_week · Covered · 1 test
    Carbon calendar: is_last_week
  • carbon_calendar.is_last_year · Covered · 1 test
    Carbon calendar: is_last_year
  • carbon_calendar.is_leap_year · Covered · 1 test
    Carbon calendar: is_leap_year
  • carbon_calendar.is_long_iso_year · Covered · 1 test
    Carbon calendar: is_long_iso_year
  • carbon_calendar.is_long_year · Covered · 1 test
    Carbon calendar: is_long_year
  • carbon_calendar.is_monday · Covered · 1 test
    Carbon calendar: is_monday
  • carbon_calendar.is_next_century · Covered · 1 test
    Carbon calendar: is_next_century
  • carbon_calendar.is_next_day · Covered · 1 test
    Carbon calendar: is_next_day
  • carbon_calendar.is_next_decade · Covered · 1 test
    Carbon calendar: is_next_decade
  • carbon_calendar.is_next_hour · Covered · 1 test
    Carbon calendar: is_next_hour
  • carbon_calendar.is_next_microsecond · Covered · 1 test
    Carbon calendar: is_next_microsecond
  • carbon_calendar.is_next_millennium · Covered · 1 test
    Carbon calendar: is_next_millennium
  • carbon_calendar.is_next_millisecond · Covered · 1 test
    Carbon calendar: is_next_millisecond
  • carbon_calendar.is_next_minute · Covered · 1 test
    Carbon calendar: is_next_minute
  • carbon_calendar.is_next_month · Covered · 1 test
    Carbon calendar: is_next_month
  • carbon_calendar.is_next_quarter · Covered · 1 test
    Carbon calendar: is_next_quarter
  • carbon_calendar.is_next_second · Covered · 1 test
    Carbon calendar: is_next_second
  • carbon_calendar.is_next_unit · Covered · 1 test
    Carbon calendar: is_next_unit
  • carbon_calendar.is_next_week · Covered · 1 test
    Carbon calendar: is_next_week
  • carbon_calendar.is_next_year · Covered · 1 test
    Carbon calendar: is_next_year
  • carbon_calendar.is_now_or_future · Covered · 1 test
    Carbon calendar: is_now_or_future
  • carbon_calendar.is_now_or_past · Covered · 1 test
    Carbon calendar: is_now_or_past
  • carbon_calendar.is_past · Covered · 1 test
    Carbon calendar: is_past
  • carbon_calendar.is_same_century · Covered · 1 test
    Carbon calendar: is_same_century
  • carbon_calendar.is_same_day · Covered · 1 test
    Carbon calendar: is_same_day
  • carbon_calendar.is_same_decade · Covered · 1 test
    Carbon calendar: is_same_decade
  • carbon_calendar.is_same_hour · Covered · 1 test
    Carbon calendar: is_same_hour
  • carbon_calendar.is_same_microsecond · Covered · 1 test
    Carbon calendar: is_same_microsecond
  • carbon_calendar.is_same_millennium · Covered · 1 test
    Carbon calendar: is_same_millennium
  • carbon_calendar.is_same_millisecond · Covered · 1 test
    Carbon calendar: is_same_millisecond
  • carbon_calendar.is_same_minute · Covered · 1 test
    Carbon calendar: is_same_minute
  • carbon_calendar.is_same_month · Covered · 1 test
    Carbon calendar: is_same_month
  • carbon_calendar.is_same_month_with_year · Covered · 1 test
    Carbon calendar: is_same_month_with_year
  • carbon_calendar.is_same_quarter · Covered · 1 test
    Carbon calendar: is_same_quarter
  • carbon_calendar.is_same_quarter_with_year · Covered · 1 test
    Carbon calendar: is_same_quarter_with_year
  • carbon_calendar.is_same_second · Covered · 1 test
    Carbon calendar: is_same_second
  • carbon_calendar.is_same_unit · Covered · 1 test
    Carbon calendar: is_same_unit
  • carbon_calendar.is_same_week · Covered · 1 test
    Carbon calendar: is_same_week
  • carbon_calendar.is_same_year · Covered · 1 test
    Carbon calendar: is_same_year
  • carbon_calendar.is_saturday · Covered · 1 test
    Carbon calendar: is_saturday
  • carbon_calendar.is_start_of_day · Covered · 1 test
    Carbon calendar: is_start_of_day
  • carbon_calendar.is_start_of_day_with_interval · Covered · 1 test
    Carbon calendar: is_start_of_day_with_interval
  • carbon_calendar.is_start_of_day_with_precision · Covered · 1 test
    Carbon calendar: is_start_of_day_with_precision
  • carbon_calendar.is_sunday · Covered · 1 test
    Carbon calendar: is_sunday
  • carbon_calendar.is_thursday · Covered · 1 test
    Carbon calendar: is_thursday
  • carbon_calendar.is_today · Covered · 1 test
    Carbon calendar: is_today
  • carbon_calendar.is_tomorrow · Covered · 1 test
    Carbon calendar: is_tomorrow
  • carbon_calendar.is_tuesday · Covered · 1 test
    Carbon calendar: is_tuesday
  • carbon_calendar.is_wednesday · Covered · 1 test
    Carbon calendar: is_wednesday
  • carbon_calendar.is_weekday · Covered · 1 test
    Carbon calendar: is_weekday
  • carbon_calendar.is_weekend · Covered · 1 test
    Carbon calendar: is_weekend
  • carbon_calendar.is_yesterday · Covered · 1 test
    Carbon calendar: is_yesterday
  • carbon_calendar.iso_week · Covered · 1 test
    Carbon calendar: iso_week
  • carbon_calendar.iso_week_year · Covered · 1 test
    Carbon calendar: iso_week_year
  • carbon_calendar.last_of_month · Covered · 1 test
    Carbon calendar: last_of_month
  • carbon_calendar.last_of_quarter · Covered · 1 test
    Carbon calendar: last_of_quarter
  • carbon_calendar.last_of_year · Covered · 1 test
    Carbon calendar: last_of_year
  • carbon_calendar.local · Covered · 1 test
    Carbon calendar: local
  • carbon_calendar.lt · Covered · 1 test
    Carbon calendar: lt
  • carbon_calendar.lte · Covered · 1 test
    Carbon calendar: lte
  • carbon_calendar.max · Covered · 1 test
    Carbon calendar: max
  • carbon_calendar.micro · Covered · 1 test
    Carbon calendar: micro
  • carbon_calendar.millennium · Covered · 1 test
    Carbon calendar: millennium
  • carbon_calendar.milli · Covered · 1 test
    Carbon calendar: milli
  • carbon_calendar.min · Covered · 1 test
    Carbon calendar: min
  • carbon_calendar.minute · Covered · 1 test
    Carbon calendar: minute
  • carbon_calendar.month · Covered · 1 test
    Carbon calendar: month
  • carbon_calendar.ne · Covered · 1 test
    Carbon calendar: ne
  • carbon_calendar.next · Covered · 1 test
    Carbon calendar: next
  • carbon_calendar.nth_of_month · Covered · 1 test
    Carbon calendar: nth_of_month
  • carbon_calendar.nth_of_quarter · Covered · 1 test
    Carbon calendar: nth_of_quarter
  • carbon_calendar.nth_of_year · Covered · 1 test
    Carbon calendar: nth_of_year
  • carbon_calendar.offset · Covered · 1 test
    Carbon calendar: offset
  • carbon_calendar.offset_hours · Covered · 1 test
    Carbon calendar: offset_hours
  • carbon_calendar.previous · Covered · 1 test
    Carbon calendar: previous
  • carbon_calendar.quarter · Covered · 1 test
    Carbon calendar: quarter
  • carbon_calendar.second · Covered · 1 test
    Carbon calendar: second
  • carbon_calendar.set_date · Covered · 1 test
    Carbon calendar: set_date
  • carbon_calendar.set_iso_date · Covered · 1 test
    Carbon calendar: set_iso_date
  • carbon_calendar.set_time · Covered · 1 test
    Carbon calendar: set_time
  • carbon_calendar.set_timezone · Covered · 1 test
    Carbon calendar: set_timezone
  • carbon_calendar.start_of_century · Covered · 1 test
    Carbon calendar: start_of_century
  • carbon_calendar.start_of_day · Covered · 1 test
    Carbon calendar: start_of_day
  • carbon_calendar.start_of_decade · Covered · 1 test
    Carbon calendar: start_of_decade
  • carbon_calendar.start_of_hour · Covered · 1 test
    Carbon calendar: start_of_hour
  • carbon_calendar.start_of_millennium · Covered · 1 test
    Carbon calendar: start_of_millennium
  • carbon_calendar.start_of_millisecond · Covered · 1 test
    Carbon calendar: start_of_millisecond
  • carbon_calendar.start_of_minute · Covered · 1 test
    Carbon calendar: start_of_minute
  • carbon_calendar.start_of_month · Covered · 1 test
    Carbon calendar: start_of_month
  • carbon_calendar.start_of_quarter · Covered · 1 test
    Carbon calendar: start_of_quarter
  • carbon_calendar.start_of_second · Covered · 1 test
    Carbon calendar: start_of_second
  • carbon_calendar.start_of_unit · Covered · 1 test
    Carbon calendar: start_of_unit
  • carbon_calendar.start_of_week · Covered · 1 test
    Carbon calendar: start_of_week
  • carbon_calendar.start_of_week_on · Covered · 1 test
    Carbon calendar: start_of_week_on
  • carbon_calendar.start_of_year · Covered · 1 test
    Carbon calendar: start_of_year
  • carbon_calendar.sub_centuries · Covered · 1 test
    Carbon calendar: sub_centuries
  • carbon_calendar.sub_centuries_no_overflow · Covered · 1 test
    Carbon calendar: sub_centuries_no_overflow
  • carbon_calendar.sub_centuries_with_overflow · Covered · 1 test
    Carbon calendar: sub_centuries_with_overflow
  • carbon_calendar.sub_days · Covered · 1 test
    Carbon calendar: sub_days
  • carbon_calendar.sub_decades · Covered · 1 test
    Carbon calendar: sub_decades
  • carbon_calendar.sub_decades_no_overflow · Covered · 1 test
    Carbon calendar: sub_decades_no_overflow
  • carbon_calendar.sub_decades_with_overflow · Covered · 1 test
    Carbon calendar: sub_decades_with_overflow
  • carbon_calendar.sub_hours · Covered · 1 test
    Carbon calendar: sub_hours
  • carbon_calendar.sub_microseconds · Covered · 1 test
    Carbon calendar: sub_microseconds
  • carbon_calendar.sub_millennia · Covered · 1 test
    Carbon calendar: sub_millennia
  • carbon_calendar.sub_millennia_no_overflow · Covered · 1 test
    Carbon calendar: sub_millennia_no_overflow
  • carbon_calendar.sub_millennia_with_overflow · Covered · 1 test
    Carbon calendar: sub_millennia_with_overflow
  • carbon_calendar.sub_milliseconds · Covered · 1 test
    Carbon calendar: sub_milliseconds
  • carbon_calendar.sub_minutes · Covered · 1 test
    Carbon calendar: sub_minutes
  • carbon_calendar.sub_months · Covered · 1 test
    Carbon calendar: sub_months
  • carbon_calendar.sub_months_no_overflow · Covered · 1 test
    Carbon calendar: sub_months_no_overflow
  • carbon_calendar.sub_months_with_overflow · Covered · 1 test
    Carbon calendar: sub_months_with_overflow
  • carbon_calendar.sub_quarters · Covered · 1 test
    Carbon calendar: sub_quarters
  • carbon_calendar.sub_quarters_no_overflow · Covered · 1 test
    Carbon calendar: sub_quarters_no_overflow
  • carbon_calendar.sub_quarters_with_overflow · Covered · 1 test
    Carbon calendar: sub_quarters_with_overflow
  • carbon_calendar.sub_seconds · Covered · 1 test
    Carbon calendar: sub_seconds
  • carbon_calendar.sub_span · Covered · 1 test
    Carbon calendar: sub_span
  • carbon_calendar.sub_unit · Covered · 1 test
    Carbon calendar: sub_unit
  • carbon_calendar.sub_weekdays · Covered · 1 test
    Carbon calendar: sub_weekdays
  • carbon_calendar.sub_weeks · Covered · 1 test
    Carbon calendar: sub_weeks
  • carbon_calendar.sub_years · Covered · 1 test
    Carbon calendar: sub_years
  • carbon_calendar.sub_years_no_overflow · Covered · 1 test
    Carbon calendar: sub_years_no_overflow
  • carbon_calendar.sub_years_with_overflow · Covered · 1 test
    Carbon calendar: sub_years_with_overflow
  • carbon_calendar.timestamp · Covered · 1 test
    Carbon calendar: timestamp
  • carbon_calendar.timestamp_float · Covered · 1 test
    Carbon calendar: timestamp_float
  • carbon_calendar.timestamp_ms · Covered · 1 test
    Carbon calendar: timestamp_ms
  • carbon_calendar.timezone_name · Covered · 1 test
    Carbon calendar: timezone_name
  • carbon_calendar.tz_abbreviation · Covered · 1 test
    Carbon calendar: tz_abbreviation
  • carbon_calendar.utc · Covered · 1 test
    Carbon calendar: utc
  • carbon_calendar.week_number_in_month · Covered · 1 test
    Carbon calendar: week_number_in_month
  • carbon_calendar.week_of_month · Covered · 1 test
    Carbon calendar: week_of_month
  • carbon_calendar.week_of_year · Covered · 1 test
    Carbon calendar: week_of_year
  • carbon_calendar.year · Covered · 1 test
    Carbon calendar: year
  • carbon_diff.diff_for_humans · Covered · Core · 1 test
    Carbon relative time: diff_for_humans
  • carbon_diff.diff_for_humans_join_callback · Covered · Core · 1 test
    Carbon relative time: diff_for_humans_join_callback
  • carbon_diff.diff_for_humans_localized · Covered · Core · 1 test
    Carbon relative time: diff_for_humans_localized
  • carbon_format.create_from_format · Covered · Core · 1 test
    Carbon and PHP date formatting: create_from_format
  • carbon_format.create_from_timestamp · Covered · Core · 1 test
    Carbon and PHP date formatting: create_from_timestamp
  • carbon_format.format · Diverged · Core
    Carbon and PHP date formatting: format
  • carbon_format.parse_date · Covered · Core · 1 test
    Carbon and PHP date formatting: parse_date
  • carbon_format.to_atom_string · Covered · Core · 1 test
    Carbon and PHP date formatting: to_atom_string
  • carbon_format.to_cookie_string · Covered · Core · 1 test
    Carbon and PHP date formatting: to_cookie_string
  • carbon_format.to_date_string · Covered · Core · 1 test
    Carbon and PHP date formatting: to_date_string
  • carbon_format.to_date_time_string · Covered · Core · 1 test
    Carbon and PHP date formatting: to_date_time_string
  • carbon_format.to_date_time_string_with · Covered · Core · 1 test
    Carbon and PHP date formatting: to_date_time_string_with
  • carbon_format.to_day_date_time_string · Covered · Core · 1 test
    Carbon and PHP date formatting: to_day_date_time_string
  • carbon_format.to_formatted_date_string · Covered · Core · 1 test
    Carbon and PHP date formatting: to_formatted_date_string
  • carbon_format.to_iso8601_string · Covered · Core · 1 test
    Carbon and PHP date formatting: to_iso8601_string
  • carbon_format.to_iso_string · Covered · Core · 1 test
    Carbon and PHP date formatting: to_iso_string
  • carbon_format.to_iso_string_keep_offset · Covered · Core · 1 test
    Carbon and PHP date formatting: to_iso_string_keep_offset
  • carbon_format.to_rfc2822_string · Covered · Core · 1 test
    Carbon and PHP date formatting: to_rfc2822_string
  • carbon_format.to_rss_string · Covered · Core · 1 test
    Carbon and PHP date formatting: to_rss_string
  • carbon_format.to_time_string · Covered · Core · 1 test
    Carbon and PHP date formatting: to_time_string
  • carbon_format.to_w3c_string · Covered · Core · 1 test
    Carbon and PHP date formatting: to_w3c_string
  • carbon_locale.calendar · Covered · 1 test
    Carbon localization: calendar
  • carbon_locale.diff_for_humans_in · Covered · 1 test
    Carbon localization: diff_for_humans_in
  • carbon_locale.iso_format · Covered · 1 test
    Carbon localization: iso_format
  • carbon_locale.translated_format · Covered · 1 test
    Carbon localization: translated_format
  • number.abbreviate · Covered · Core · 1 test
    Illuminate Number: abbreviate
  • number.clamp · Covered · Core · 1 test
    Illuminate Number: clamp
  • number.currency · Covered · Core · 1 test
    Illuminate Number: currency
  • number.file_size · Covered · Core · 1 test
    Illuminate Number: file_size
  • number.for_humans · Covered · Core · 1 test
    Illuminate Number: for_humans
  • number.format · Covered · Core · 1 test
    Illuminate Number: format
  • number.ordinal · Covered · Core · 1 test
    Illuminate Number: ordinal
  • number.pairs · Covered · Core · 1 test
    Illuminate Number: pairs
  • number.percentage · Covered · Core · 1 test
    Illuminate Number: percentage
  • number.trim · Covered · Core · 1 test
    Illuminate Number: trim
  • number_ext.abbreviate · Covered · 1 test
    Illuminate Number with ICU: abbreviate
  • number_ext.currency · Covered · 1 test
    Illuminate Number with ICU: currency
  • number_ext.file_size · Covered · 1 test
    Illuminate Number with ICU: file_size
  • number_ext.for_humans · Covered · 1 test
    Illuminate Number with ICU: for_humans
  • number_ext.format · Covered · 1 test
    Illuminate Number with ICU: format
  • number_ext.ordinal · Covered · 1 test
    Illuminate Number with ICU: ordinal
  • number_ext.parse · Covered · 1 test
    Illuminate Number with ICU: parse
  • number_ext.parse_float · Covered · 1 test
    Illuminate Number with ICU: parse_float
  • number_ext.parse_int · Covered · 1 test
    Illuminate Number with ICU: parse_int
  • number_ext.percentage · Covered · 1 test
    Illuminate Number with ICU: percentage
  • number_ext.spell · Covered · 1 test
    Illuminate Number with ICU: spell
  • number_ext.spell_ordinal · Covered · 1 test
    Illuminate Number with ICU: spell_ordinal
  • php.echo · Covered · Core · 1 test
    PHP scalar formatting: echo
  • php.lcfirst · Covered · Core · 1 test
    PHP scalar formatting: lcfirst
  • php.number_format · Covered · Core · 1 test
    PHP scalar formatting: number_format
  • php.round · Covered · Core · 1 test
    PHP scalar formatting: round
  • php.strtolower · Covered · Core · 1 test
    PHP scalar formatting: strtolower
  • php.strtoupper · Covered · Core · 1 test
    PHP scalar formatting: strtoupper
  • php.ucfirst · Covered · Core · 1 test
    PHP scalar formatting: ucfirst
  • php.ucwords · Covered · Core · 1 test
    PHP scalar formatting: ucwords
  • php_json.js_from · Covered · 1 test
    PHP JSON and Illuminate Js: js_from
  • php_json.js_from_object · Covered · 1 test
    PHP JSON and Illuminate Js: js_from_object
  • php_json.json_depth · Covered · 1 test
    PHP JSON and Illuminate Js: json_depth
  • php_json.json_encode · Covered · 1 test
    PHP JSON and Illuminate Js: json_encode
  • php_json.json_encode_with · Covered · 1 test
    PHP JSON and Illuminate Js: json_encode_with
  • php_sprintf.sprintf · Covered · 1 test
    PHP formatted strings: sprintf
  • php_sprintf.sprintf_bytes · Covered · 1 test
    PHP formatted strings: sprintf_bytes
  • php_strings.addslashes · Covered · 1 test
    PHP string functions: addslashes
  • php_strings.base64_decode · Covered · 1 test
    PHP string functions: base64_decode
  • php_strings.base64_encode · Covered · 1 test
    PHP string functions: base64_encode
  • php_strings.bin2hex · Covered · 1 test
    PHP string functions: bin2hex
  • php_strings.crc32 · Covered · 1 test
    PHP string functions: crc32
  • php_strings.e · Covered · 1 test
    PHP string functions: e
  • php_strings.explode · Covered · 1 test
    PHP string functions: explode
  • php_strings.html_entity_decode · Covered · 1 test
    PHP string functions: html_entity_decode
  • php_strings.htmlentities · Covered · 1 test
    PHP string functions: htmlentities
  • php_strings.htmlspecialchars · Covered · 1 test
    PHP string functions: htmlspecialchars
  • php_strings.htmlspecialchars_decode · Covered · 1 test
    PHP string functions: htmlspecialchars_decode
  • php_strings.http_build_query · Covered · 1 test
    PHP string functions: http_build_query
  • php_strings.implode · Covered · 1 test
    PHP string functions: implode
  • php_strings.ltrim · Covered · 1 test
    PHP string functions: ltrim
  • php_strings.mb_str_pad · Covered · 1 test
    PHP string functions: mb_str_pad
  • php_strings.mb_str_split · Covered · 1 test
    PHP string functions: mb_str_split
  • php_strings.mb_strimwidth · Covered · 1 test
    PHP string functions: mb_strimwidth
  • php_strings.mb_strlen · Covered · 1 test
    PHP string functions: mb_strlen
  • php_strings.mb_strwidth · Covered · 1 test
    PHP string functions: mb_strwidth
  • php_strings.mb_substr · Covered · 1 test
    PHP string functions: mb_substr
  • php_strings.nl2br · Covered · 1 test
    PHP string functions: nl2br
  • php_strings.quotemeta · Covered · 1 test
    PHP string functions: quotemeta
  • php_strings.rawurldecode · Covered · 1 test
    PHP string functions: rawurldecode
  • php_strings.rawurlencode · Covered · 1 test
    PHP string functions: rawurlencode
  • php_strings.rtrim · Covered · 1 test
    PHP string functions: rtrim
  • php_strings.str_ireplace · Covered · 1 test
    PHP string functions: str_ireplace
  • php_strings.str_pad · Covered · 1 test
    PHP string functions: str_pad
  • php_strings.str_repeat · Covered · 1 test
    PHP string functions: str_repeat
  • php_strings.str_replace · Covered · 1 test
    PHP string functions: str_replace
  • php_strings.str_word_count · Covered · 1 test
    PHP string functions: str_word_count
  • php_strings.strip_tags · Covered · 1 test
    PHP string functions: strip_tags
  • php_strings.stripslashes · Covered · 1 test
    PHP string functions: stripslashes
  • php_strings.strlen · Covered · 1 test
    PHP string functions: strlen
  • php_strings.strrev · Covered · 1 test
    PHP string functions: strrev
  • php_strings.strtr · Covered · 1 test
    PHP string functions: strtr
  • php_strings.substr · Covered · 1 test
    PHP string functions: substr
  • php_strings.trim · Covered · 1 test
    PHP string functions: trim
  • php_strings.urldecode · Covered · 1 test
    PHP string functions: urldecode
  • php_strings.urlencode · Covered · 1 test
    PHP string functions: urlencode
  • php_strings.wordwrap · Covered · 1 test
    PHP string functions: wordwrap
  • php_values.array_append · Covered · 1 test
    PHP values and arrays: array_append
  • php_values.array_filter · Covered · 1 test
    PHP values and arrays: array_filter
  • php_values.array_values · Covered · 1 test
    PHP values and arrays: array_values
  • php_values.boolval · Covered · 1 test
    PHP values and arrays: boolval
  • php_values.echo · Covered · 1 test
    PHP values and arrays: echo
  • php_values.filter_append · Covered · 1 test
    PHP values and arrays: filter_append
  • php_values.floatval · Covered · 1 test
    PHP values and arrays: floatval
  • php_values.intval · Covered · 1 test
    PHP values and arrays: intval
  • php_values.loose_eq · Covered · 1 test
    PHP values and arrays: loose_eq
  • php_values.loose_eq_self · Covered · 1 test
    PHP values and arrays: loose_eq_self
  • php_values.strval · Covered · 1 test
    PHP values and arrays: strval
  • str_ascii.ascii · Covered · Core · 1 test
    Illuminate Str transliteration: ascii
  • str_ascii.slug · Covered · Core · 1 test
    Illuminate Str transliteration: slug
  • str_case.headline · Covered · Core · 1 test
    Illuminate Str case and limits: headline
  • str_case.lcfirst · Covered · Core · 1 test
    Illuminate Str case and limits: lcfirst
  • str_case.limit · Covered · Core · 1 test
    Illuminate Str case and limits: limit
  • str_case.limit_preserve_words · Covered · Core · 1 test
    Illuminate Str case and limits: limit_preserve_words
  • str_case.limit_with · Covered · Core · 1 test
    Illuminate Str case and limits: limit_with
  • str_case.lower · Covered · Core · 1 test
    Illuminate Str case and limits: lower
  • str_case.title · Covered · Core · 1 test
    Illuminate Str case and limits: title
  • str_case.ucfirst · Covered · Core · 1 test
    Illuminate Str case and limits: ucfirst
  • str_case.ucsplit · Covered · Core · 1 test
    Illuminate Str case and limits: ucsplit
  • str_case.upper · Covered · Core · 1 test
    Illuminate Str case and limits: upper
  • str_case.words · Covered · Core · 1 test
    Illuminate Str case and limits: words
  • str_case.words_with · Covered · Core · 1 test
    Illuminate Str case and limits: words_with
  • str_pattern.inline_markdown · Diverged
    Illuminate Str patterns and identifiers: inline_markdown
  • str_pattern.is_match · Covered · 1 test
    Illuminate Str patterns and identifiers: is_match
  • str_pattern.markdown · Diverged
    Illuminate Str patterns and identifiers: markdown
  • str_pattern.match_all · Covered · 1 test
    Illuminate Str patterns and identifiers: match_all
  • str_pattern.match_first · Covered · 1 test
    Illuminate Str patterns and identifiers: match_first
  • str_pattern.match_first_limit · Covered · 1 test
    Illuminate Str patterns and identifiers: match_first_limit
  • str_pattern.ordered_uuid_properties · Covered · 1 test
    Illuminate Str patterns and identifiers: ordered_uuid_properties
  • str_pattern.password_properties · Covered · 1 test
    Illuminate Str patterns and identifiers: password_properties
  • str_pattern.random_properties · Covered · 1 test
    Illuminate Str patterns and identifiers: random_properties
  • str_pattern.replace_matches · Covered · 1 test
    Illuminate Str patterns and identifiers: replace_matches
  • str_pattern.replace_matches_callback · Covered · 1 test
    Illuminate Str patterns and identifiers: replace_matches_callback
  • str_pattern.replace_matches_many · Covered · 1 test
    Illuminate Str patterns and identifiers: replace_matches_many
  • str_pattern.ulid_properties · Covered · 1 test
    Illuminate Str patterns and identifiers: ulid_properties
  • str_pattern.uuid7_properties · Diverged
    Illuminate Str patterns and identifiers: uuid7_properties
  • str_pattern.uuid_properties · Covered · 1 test
    Illuminate Str patterns and identifiers: uuid_properties
  • str_plural.plural · Covered · Core · 1 test
    Illuminate pluralization and slugs: plural
  • str_plural.plural_pascal · Covered · Core · 1 test
    Illuminate pluralization and slugs: plural_pascal
  • str_plural.plural_prepend · Covered · Core · 1 test
    Illuminate pluralization and slugs: plural_prepend
  • str_plural.plural_studly · Covered · Core · 1 test
    Illuminate pluralization and slugs: plural_studly
  • str_plural.pluralize · Covered · Core · 1 test
    Illuminate pluralization and slugs: pluralize
  • str_plural.singular · Covered · Core · 1 test
    Illuminate pluralization and slugs: singular
  • str_search.after · Covered · 1 test
    Illuminate Str search: after
  • str_search.after_last · Covered · 1 test
    Illuminate Str search: after_last
  • str_search.before · Covered · 1 test
    Illuminate Str search: before
  • str_search.before_last · Covered · 1 test
    Illuminate Str search: before_last
  • str_search.between · Covered · 1 test
    Illuminate Str search: between
  • str_search.between_first · Covered · 1 test
    Illuminate Str search: between_first
  • str_search.char_at · Covered · 1 test
    Illuminate Str search: char_at
  • str_search.chop_end · Covered · 1 test
    Illuminate Str search: chop_end
  • str_search.chop_start · Covered · 1 test
    Illuminate Str search: chop_start
  • str_search.contains · Covered · 1 test
    Illuminate Str search: contains
  • str_search.contains_all · Covered · 1 test
    Illuminate Str search: contains_all
  • str_search.counted · Covered · 1 test
    Illuminate Str search: counted
  • str_search.doesnt_contain · Covered · 1 test
    Illuminate Str search: doesnt_contain
  • str_search.doesnt_end_with · Covered · 1 test
    Illuminate Str search: doesnt_end_with
  • str_search.doesnt_start_with · Covered · 1 test
    Illuminate Str search: doesnt_start_with
  • str_search.ends_with · Covered · 1 test
    Illuminate Str search: ends_with
  • str_search.excerpt · Covered · 1 test
    Illuminate Str search: excerpt
  • str_search.finish · Covered · 1 test
    Illuminate Str search: finish
  • str_search.is · Covered · 1 test
    Illuminate Str search: is
  • str_search.is_ascii · Covered · 1 test
    Illuminate Str search: is_ascii
  • str_search.is_json · Covered · 1 test
    Illuminate Str search: is_json
  • str_search.is_ulid · Covered · 1 test
    Illuminate Str search: is_ulid
  • str_search.is_url · Covered · 1 test
    Illuminate Str search: is_url
  • str_search.is_uuid · Covered · 1 test
    Illuminate Str search: is_uuid
  • str_search.length · Covered · 1 test
    Illuminate Str search: length
  • str_search.parse_callback · Covered · 1 test
    Illuminate Str search: parse_callback
  • str_search.position · Covered · 1 test
    Illuminate Str search: position
  • str_search.start · Covered · 1 test
    Illuminate Str search: start
  • str_search.starts_with · Covered · 1 test
    Illuminate Str search: starts_with
  • str_search.substr · Covered · 1 test
    Illuminate Str search: substr
  • str_search.substr_count · Covered · 1 test
    Illuminate Str search: substr_count
  • str_search.substr_encoded · Covered · 1 test
    Illuminate Str search: substr_encoded
  • str_search.substr_replace · Covered · 1 test
    Illuminate Str search: substr_replace
  • str_search.take · Covered · 1 test
    Illuminate Str search: take
  • str_search.unwrap · Covered · 1 test
    Illuminate Str search: unwrap
  • str_search.wrap · Covered · 1 test
    Illuminate Str search: wrap
  • str_transform.apa · Covered · 1 test
    Illuminate Str transformations: apa
  • str_transform.append · Covered · 1 test
    Illuminate Str transformations: append
  • str_transform.camel · Covered · 1 test
    Illuminate Str transformations: camel
  • str_transform.convert_case · Covered · 1 test
    Illuminate Str transformations: convert_case
  • str_transform.deduplicate · Covered · 1 test
    Illuminate Str transformations: deduplicate
  • str_transform.flush_cache · Covered · 1 test
    Illuminate Str transformations: flush_cache
  • str_transform.from_base64 · Covered · 1 test
    Illuminate Str transformations: from_base64
  • str_transform.initials · Covered · 1 test
    Illuminate Str transformations: initials
  • str_transform.kebab · Covered · 1 test
    Illuminate Str transformations: kebab
  • str_transform.ltrim · Covered · 1 test
    Illuminate Str transformations: ltrim
  • str_transform.mask · Covered · 1 test
    Illuminate Str transformations: mask
  • str_transform.numbers · Covered · 1 test
    Illuminate Str transformations: numbers
  • str_transform.pad_both · Covered · 1 test
    Illuminate Str transformations: pad_both
  • str_transform.pad_left · Covered · 1 test
    Illuminate Str transformations: pad_left
  • str_transform.pad_right · Covered · 1 test
    Illuminate Str transformations: pad_right
  • str_transform.pascal · Covered · 1 test
    Illuminate Str transformations: pascal
  • str_transform.prepend · Covered · 1 test
    Illuminate Str transformations: prepend
  • str_transform.remove · Covered · 1 test
    Illuminate Str transformations: remove
  • str_transform.repeat · Covered · 1 test
    Illuminate Str transformations: repeat
  • str_transform.replace · Covered · 1 test
    Illuminate Str transformations: replace
  • str_transform.replace_array · Covered · 1 test
    Illuminate Str transformations: replace_array
  • str_transform.replace_end · Covered · 1 test
    Illuminate Str transformations: replace_end
  • str_transform.replace_first · Covered · 1 test
    Illuminate Str transformations: replace_first
  • str_transform.replace_last · Covered · 1 test
    Illuminate Str transformations: replace_last
  • str_transform.replace_start · Covered · 1 test
    Illuminate Str transformations: replace_start
  • str_transform.reverse · Covered · 1 test
    Illuminate Str transformations: reverse
  • str_transform.rtrim · Covered · 1 test
    Illuminate Str transformations: rtrim
  • str_transform.snake · Covered · 1 test
    Illuminate Str transformations: snake
  • str_transform.squish · Covered · 1 test
    Illuminate Str transformations: squish
  • str_transform.studly · Covered · 1 test
    Illuminate Str transformations: studly
  • str_transform.swap · Covered · 1 test
    Illuminate Str transformations: swap
  • str_transform.to_base64 · Covered · 1 test
    Illuminate Str transformations: to_base64
  • str_transform.transliterate · Covered · 1 test
    Illuminate Str transformations: transliterate
  • str_transform.transliterate_strict · Covered · 1 test
    Illuminate Str transformations: transliterate_strict
  • str_transform.trim · Covered · 1 test
    Illuminate Str transformations: trim
  • str_transform.ucwords · Covered · 1 test
    Illuminate Str transformations: ucwords
  • str_transform.word_count · Covered · 1 test
    Illuminate Str transformations: word_count
  • str_transform.word_wrap · Covered · 1 test
    Illuminate Str transformations: word_wrap
  • value.numeric · Covered · 1 test
    PHP numeric coercion: numeric
  • str.fluent · Planned
    Illuminate Str::of() fluent Stringable builders
  • str.macros · Planned
    Illuminate Str::macro() and runtime macro registration
  • carbon.custom_translator · Planned
    Carbon::setTranslator() and custom translation catalogues

Differences from PHP

Carbon and PHP date formatting: format
Jiff normalizes the UTC offset, so timezone-name tokens can print UTC for a fixed zero offset.
Illuminate Str patterns and identifiers: inline_markdown
The Comrak renderer adapts a block parser and has recorded inline output differences.
Illuminate Str patterns and identifiers: markdown
The Comrak renderer has recorded CommonMark and GFM output differences.
Illuminate Str patterns and identifiers: uuid7_properties
The explicit sequence generator increments entropy within a millisecond; Ramsey can use random increments.

In practice

The traps it removes

Rust's defaults and PHP's disagree on rounding, float output, display width and transliteration.

use laravel_rust_format_core::{carbon, number, php, str};

assert_eq!(format!("{:.2}", 1.005), "1.00");
assert_eq!(php::number_format(1.005, 2).unwrap(), "1.01");
assert_eq!(php::echo(0.1 + 0.2), "0.3");

assert_eq!(str::limit("東京", 2), "東...");
assert_eq!(str::slug("Café Mañana & Co."), "cafe-manana-co");
assert_eq!(str::plural("criterion", 2), "criteria");

assert_eq!(number::file_size(1000), "1 KB");
assert_eq!(number::currency(1234.5, "JPY").as_deref(), Some("¥1,234"));

let date: jiff::Timestamp = "2026-12-03T14:30:07Z".parse().unwrap();
assert_eq!(carbon::format(date, "l jS F").unwrap(), "Thursday 3rd December");

In a MiniJinja view

With the service provider registered, templates read the way Blade did.

{{ 1.005|number_format(2) }} {# 1.01 #}
{{ "criterion"|str_plural(2) }} {# criteria #}

Relative dates, the Carbon way

Carbon has two wordings, and the API keeps them apart: relative to the clock, and relative to another date.

use laravel_rust_format_core::carbon::{self, DiffForHumans, Relative};

let now: jiff::ZonedDateTime = "2026-12-03T14:30:00+00:00[UTC]".parse().unwrap();
let created: jiff::ZonedDateTime = "2026-11-03T14:30:00+00:00[UTC]".parse().unwrap();
let soon: jiff::ZonedDateTime = "2027-01-02T14:30:00+00:00[UTC]".parse().unwrap();
let seen: jiff::ZonedDateTime = "2026-12-03T12:00:00+00:00[UTC]".parse().unwrap();

// $created->diffForHumans()
assert_eq!(carbon::diff_for_humans(&created, Relative::Now(now.clone())).unwrap(), "1 month ago");
// Carbon counts calendar months: 30 days ahead is still weeks.
assert_eq!(carbon::diff_for_humans(&soon, Relative::Now(now.clone())).unwrap(), "4 weeks from now");
// $created->diffForHumans($soon)
assert_eq!(carbon::diff_for_humans(&created, Relative::To(&soon)).unwrap(), "1 month before");
// diffForHumans(short: true), and parts: 2 with join
assert_eq!(DiffForHumans::new().short().apply(&seen, Relative::Now(now.clone())).unwrap(), "2h ago");
assert_eq!(DiffForHumans::new().parts(2).join().apply(&seen, Relative::Now(now)).unwrap(), "2 hours and 30 minutes ago");

Built on

  • Laravel Str, Number and Pluralizer: The behaviour of Illuminate\Support\Str, Number and Pluralizer, as typed Rust functions with English defaults.
  • Carbon: The calendar, formats and relative-time translations, on Jiff with an explicit clock instant. The generated locale tables credit the authors of each language file.
  • Doctrine Inflector: English inflection rules, generated into Rust tables.
  • Portable ASCII: Transliteration tables for Str::ascii and Str::slug, generated into Rust tables.
  • League CommonMark: Reference behaviour for Markdown in the PHP oracle; Comrak renders Markdown in Rust.
  • Ramsey UUID: Reference behaviour for identifiers in the PHP oracle; the core builds them in Rust.
  • Symfony UID: Reference behaviour for identifiers in the PHP oracle; the core builds them in Rust.

Crates: laravel-rust-format, laravel-rust-format-core · Upstream notices

Used in production across multiple projects.

Documentation