Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set Locale #112

Closed
mhadaily opened this issue Jan 12, 2018 · 2 comments
Closed

set Locale #112

mhadaily opened this issue Jan 12, 2018 · 2 comments

Comments

@mhadaily
Copy link

Hi,
thanks for your awesome work.
Just wondering, are you going to support locale? https://date-fns.org/v1.29.0/docs/I18n

@mhadaily
Copy link
Author

Ah I just see you are supporting options

  static readonly NO_ARGS_ERROR = 'dfnsFormat: missing required arguments';

  transform(
    date: string | number | Date,
    format?: string,
    options?: {
      locale?: Object
    }
  ): string {
    if (!date) {
        throw new Error(FormatPipe.NO_ARGS_ERROR);
    }
    return formatDate(date, format, options);
  }
}```

thanks

@joanllenas
Copy link
Owner

Closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants