⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 计算两日期之间的相差天数.java

📁 java源程序,两个类之间的函数转换,实现相应功能
💻 JAVA
字号:
/* * To change this template, choose Tools | Templates * and open the template in the editor. */package 阶段练习一;/** * * @author lenovo */public class 计算两日期之间的相差天数 {  日期 one,two,i;   int m=0;   计算两日期之间的相差天数(日期 x,日期 y)   {one=x;    two=y;   }   int 日期计算()   {   for(i=one;i.year<two.year;i.year++)   {if(i.闰年()==1)m=m+366;    else m=m+365;   }   for(i.month=1;i.month<one.month;i.month++)m=m-i.每月天数();   for(i=two,i.month=1;i.month<two.month;i.month++)m=m+i.每月天数();    m=m+two.day-one.day;    return m;   }}    

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -