@visulima/humanizer
Version:
Humanizer is a library for humanizing data in a human-readable form.
2 lines (1 loc) • 875 B
JavaScript
import m from"./util/create-duration-language.js";import d from"./util/duration/get-czech-or-slovak-form.js";const i={den:"d",dne:"d",dní:"d",dny:"d",hodin:"h",hodina:"h",hodiny:"h",let:"y",měsíc:"mo",měsíce:"mo",měsíců:"mo",milisekund:"ms",milisekunda:"ms",milisekundy:"ms",minut:"m",minuta:"m",minuty:"m",rok:"y",roku:"y",roky:"y",sekund:"s",sekunda:"s",sekundy:"s",týden:"w",týdne:"w",týdnů:"w",týdny:"w"},u=m(n=>["rok","roku","roky","let"][d(n)],n=>["měsíc","měsíce","měsíce","měsíců"][d(n)],n=>["týden","týdne","týdny","týdnů"][d(n)],n=>["den","dne","dny","dní"][d(n)],n=>["hodina","hodiny","hodiny","hodin"][d(n)],n=>["minuta","minuty","minuty","minut"][d(n)],n=>["sekunda","sekundy","sekundy","sekund"][d(n)],n=>["milisekunda","milisekundy","milisekundy","milisekund"][d(n)],"za %s","před %s",",",i," ","_");export{u as durationLanguage};