Skip to content

Commit

Permalink
Merge pull request #305 from crgz/release
Browse files Browse the repository at this point in the history
release
  • Loading branch information
crgz authored Jan 10, 2023
2 parents 577b389 + ca63973 commit 324b5b3
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.0.380
current_version = 0.0.381
commit = True
tag = True

Expand Down
4 changes: 2 additions & 2 deletions .github/badges/release.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion pack.pl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name(abbreviated_dates).
title('Parses abbreviated and ambiguous dates in multiple languages').
version('0.0.380').
version('0.0.381').

author('Conrado M. Rodriguez','conrado.rgz@gmail.com').
maintainer('Conrado M. Rodriguez','conrado.rgz@gmail.com').
Expand Down
5 changes: 5 additions & 0 deletions prolog/abbreviated_dates.pl
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,11 @@
string(Month), b, month_day(Day),
{factor_month_day(Context, Day, Month, implicit, Date, Language, MonthFormat), atom_concat(MonthFormat,' %d', Syntax)}.

% phrase(abbreviated_dates:single_day([date(2020, 2, 28)], Date, Language, Syntax), `Jan. 1`).
single_day([Context|_], Date, Language, Syntax, _) -->
string(Month), ".", b, month_day(Day),
{factor_month_day(Context, Day, Month, explicit, Date, Language, MonthFormat), atom_concat(MonthFormat,' %d', Syntax)}.

% DATES HINTING JUST DAYS

% phrase(abbreviated_dates:single_day([date(2020, 2, 28)], Date, Language, Syntax), `31`).
Expand Down
5 changes: 5 additions & 0 deletions prolog/abbreviated_dates.plt
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,11 @@ test('Capitalized Implicitly Abbreviated Month Name & Day'):-
assertion(Languages == ['Danish','Dutch','English','German','Norwegian','Portuguese','Slovenian','Spanish','Swedish']),
assertion(Formats == ['%b %d']).

test('Capitalized Explicitly Abbreviated Month Name & Day'):-
solutions([date(2021, 9, 21)], 'Jun. 17', Dates, Languages, Formats),
assertion(Dates == [date(2022,6,17),date(2023,6,17),date(2024,6,17),date(2025,6,17),date(2026,6,17),date(2027,6,17)]),
assertion(Languages == ['Danish','Dutch','English','German','Norwegian','Portuguese','Slovenian','Spanish','Swedish']),
assertion(Formats == ['%b. %d']).

% DATES HINTING JUST DAYS

Expand Down

0 comments on commit 324b5b3

Please sign in to comment.