Skip to content

DateTime formating without hardcode #81

@hoangtuan151

Description

@hoangtuan151

Hi guys,

Firstly I want to send many many thanks to the team for your awesome project.

Second, I want to know how to format date time without hardcode:

  • Currently, I use this code this.$d(new Date(), 'short', 'vi-VN') in Vue methods's scope
  • My locale variable is: this.$i18n.locale = 'vn'
  • I dont want hardcode 'vi-VN' value, so I try this.$d(new Date(), 'short', this.$i18n.locale), but it not worked.
    How could I make this code work so that I don't have to hardcode 'vi-VN' value?

Thank in advanced!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions