Python Date Conversion. How to convert arabic date string into date or datetime object python -
i have convert date normal date string/object.
١٩٩٤-٠٤-١١ 11-04-1994.
var arabicdate = "١٩٩٤-٠٤-١١"; var europeandate = arabicdate.replace(/[\u0660-\u0669]/g, function(m) { return string.fromcharcode(m.charcodeat(m) - 0x660 + 0x30); }).split('-').reverse().join('-'); console.log(europeandate); // => 11-04-1994
edit: derp. python, not javascript. i'll leave here rewrite.
Comments
Post a Comment