You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
functionms(value,long,fr){if(!value)return0;try{letres=require('ms')(value,{ long });if(typeofres==="string"&&fr)res=res.replace('years','années').replace('weeks','semaines').replace('days','jours').replace('hours','heures').replace('seconds','secondes').replace('milliseconds','millisecondes');returnres;}catch(err){console.error(err);return;}
But still would be cool to be able to change the language returned
ms('2d').locale('fr')// 2 joursms('3y').locale('fr')// 3 années
Here, it's 'fr' for french but it could be 'en' for English (which would be by default) or whatever language people could help to support in the pull requests.
The text was updated successfully, but these errors were encountered:
I already have a function for this :
But still would be cool to be able to change the language returned
Here, it's 'fr' for french but it could be 'en' for English (which would be by default) or whatever language people could help to support in the pull requests.
The text was updated successfully, but these errors were encountered: