如何创建一个银行日历每月30天 [英] How to create a Bank Calendar with 30 days each month
问题描述
对于德国人计算年金贷款,我需要一个日历,其中每个月都有30天。每年有360天。没有闰年。
For calculating annuity loan with german I need a calendar where every month has exactly 30 days. Every year has 360 days. There are no leap years.
利息以30天为基础计算(这是德国利息法)
The interest is allways calculated on a basis of 30 day (That's the german interest method)
我使用Java 8.我有什么可能性与新的java.time API来完成我的要求?
I'm using Java 8. What possibilities do I have with the new java.time API to accomplish my requirements?
推荐答案
您所描述的是天数,而不是日历系统。日计数是将两个日期之间的期间转换为年份分数的机制。
What you describe is a day count not a calendar system. A day count is a mechanism for converting the period between two dates into a year fraction.
OpenGamma OG- Commons包括多天计数的实现,包括30E / 360,这可能是您需要的方法。
OpenGamma OG-Commons includes implementations of many day counts, including 30E/360 which may be the method you need.
这篇关于如何创建一个银行日历每月30天的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!