I'm developing a web App and I have a unix timeStamp.
I need to convert a unix date format to Jalali/Persian/Shamsi Calendar by using jQuery selectors and then convert it by using javascript library.
Something Like below code to convert Unix-Date
to Jalali-Date
:
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<div class="Unix-Date">1494259627</div> <!-- Unix equal of 1396/2/18 -->
<div class="Jalali-Date"></div>
<script src="jquery.js"></script>
<script src="external-library.js"></script>
<script>
$(document).ready(function() {
var UnixValue;
var JalaliValue;
UnixValue = $(".Unix-Date").html();
JalaliValue = new JalaliExternalFunction(UnixValue);
$(".Jalali-Date").text(JalaliValue);
});
</script>
</body>
</html>
I searched but didn't found any good library. Do you know a reliable and good library for converting (or creating dates in Jalali format from a unix timeStamp). I don't need your implementation or an algorithm, cause this issue is too buggy and has a lot of rules, I need a reliable solution.
Thank
moment.js
only translate day and mount name to persian and the date still remain in gregorian. – Cluj