We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi,
I can't register the french language in my project, this is what i have done:
const fr = require('timeago.js/lib/lang/fr'); const timeago = require('timeago.js');
const fr = require('timeago.js/lib/lang/fr');
const timeago = require('timeago.js');
timeago.register('fr', fr); timeago.format('2016-06-12', 'fr')
timeago.register('fr', fr);
timeago.format('2016-06-12', 'fr')
I got an error message: TypeError: localeFunc is not a function
TypeError: localeFunc is not a function
However, in the filetimeago.js/lib/index there is en_US and zh_CN registered by default so if i register a new fr lang it works.
timeago.js/lib/index
But every time i will push to production and install all my modules with npm install it will erase my configuration.
Am i missing something ? Thanks for your time
The text was updated successfully, but these errors were encountered:
Here are two ways that I hope will help you
const fr = require('timeago.js/lib/lang/fr').default const timeago = require('timeago.js') timeago.register('fr', fr) const date = timeago.format('2016-06-12', 'fr') console.log(date) // OR const timeago = require('timeago.js/dist/timeago.full.min') const date = timeago.format('2016-06-12', 'fr') console.log(date)
Sorry, something went wrong.
Thank you for your time @Lete114 it works !
No branches or pull requests
Hi,
I can't register the french language in my project, this is what i have done:
const fr = require('timeago.js/lib/lang/fr');
const timeago = require('timeago.js');
timeago.register('fr', fr);
timeago.format('2016-06-12', 'fr')
I got an error message:
TypeError: localeFunc is not a function
However, in the file
timeago.js/lib/index
there is en_US and zh_CN registered by default so if i register a new fr lang it works.But every time i will push to production and install all my modules with npm install it will erase my configuration.
Am i missing something ? Thanks for your time
The text was updated successfully, but these errors were encountered: