Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# v14.4.0 (2023-02-13)
* **dateformat** fixes default luxon formatting

# v14.3.0 (2023-02-08)
* **playground** showcase custom value template support
* **suggest** add custom value template support
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-components",
"version": "14.3.0",
"version": "14.4.0",
"author": {
"name": "UiPath Inc",
"url": "https://uipath.com"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ export class UiDateFormatDirective extends UiFormatDirective {
}
/**
* The 'moment' format defaults to 'L LTS'.
* The `luxon` format defaults to `DateTime.DATETIME_SHORT.
* The `luxon` format defaults to `DateTime.DATETIME_SHORT_WITH_SECONDS.
*
*/
@Input()
Expand All @@ -192,11 +192,11 @@ export class UiDateFormatDirective extends UiFormatDirective {
if (!this.date) { return ''; }
if (!(this.date instanceof Date)) { return this.date; }

const relativeTime = this._isMomentFormat(this.dateFormat)
? moment(this.date)
.fromNow()
: DateTime.fromJSDate(this.date)
.toRelative();
const relativeTime = this._useLuxon
? DateTime.fromJSDate(this.date)
.toRelative()
: moment(this.date)
.fromNow();

return relativeTime ?? '';
}
Expand Down Expand Up @@ -244,7 +244,7 @@ export class UiDateFormatDirective extends UiFormatDirective {
elementRef,
);

const defaultFormat = this._useLuxon ? DateTime.DATETIME_SHORT : 'L LTS';
const defaultFormat = this._useLuxon ? DateTime.DATETIME_SHORT_WITH_SECONDS : 'L LTS';

this._options = _options || {};
this.dateFormat = this._options.format ?? defaultFormat;
Expand Down
2 changes: 1 addition & 1 deletion projects/angular/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@uipath/angular",
"version": "14.3.0",
"version": "14.4.0",
"license": "MIT",
"author": {
"name": "UiPath Inc",
Expand Down