我怎么能返回一个伊斯兰日历使用java.util.Calendar? [英] how could i return an Islamic calendar using java.util.Calendar?

查看:181
本文介绍了我怎么能返回一个伊斯兰日历使用java.util.Calendar?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道java.util.Calendar类方法 getInstance()返回一个GregorianCalendar,但是如何得到一个伊斯兰日历?



你将不得不继承Calendar类的子类



IBM有一个实现了 Hijri 日历。



还有近似


I knew that java.util.Calendar class method getInstance() returns a GregorianCalendar but how could i get an Islamic calendar?

解决方案

There's not one built in the API.

You're going to have to subclass the Calendar class to do this or you could look at stuff that people have already written and if that will be suitable for you.

IBM has one implementation of the Hijri calendar.

There's also an approximate one provided by Joda-Time.

这篇关于我怎么能返回一个伊斯兰日历使用java.util.Calendar?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆