% This program converts for date among solardate, lunardate and ganzhi-
% date from (1900,2,4) to (2099,12,31), except the conversion from gan-
% zhidate to solardate and lunardate.
%
% This Class contains
% (a) five properties:
% year; month; day; hour; isLeap;
% (b) two static methods:
% YearDays=YearInfos2YearDays_GanZhiDate();
% YearDays=YearInfos2YearDays_LunarDate();
% (c) three private methods:
% offset=LunarDate2DayOffset(obj);
% obj=DayOffset2LunarDate(obj,offset);
% obj=DayOffset2GanZhiDate(obj,offset);
% (d) five general methods:
% obj=clsdate(year,month,day,isLeap);
% obj=SolarDate2LunarDate(obj);
% obj=LunarDate2SolarDate(obj);
% obj=SolarDate2GanZhiDate(obj);
% obj=LunarDate2GanZhiDate(obj);
%
% Example:
% [yy,mm,dd]=datevec(date);
% yy=2017;mm=7;dd=30;
% clsdate(yy,mm,dd).YearInfos2YearDays_GanZhiDate();
% clsdate(yy,mm,dd).SolarDate2LunarDate
% clsdate(yy,mm,dd).SolarDate2GanZhiDate
%
% yy=2017;mm=6;dd=8;
% clsdate(yy,mm,dd,1).YearInfos2YearDays_LunarDate;
% clsdate(yy,mm,dd,1).LunarDate2SolarDate
% clsdate(yy,mm,dd,1).LunarDate2GanZhiDate
引用格式
Shengzhao Chen (2024). clsdate() (https://www.mathworks.com/matlabcentral/fileexchange/69870-clsdate), MATLAB Central File Exchange. 检索时间: .
MATLAB 版本兼容性
平台兼容性
Windows macOS Linux类别
标签
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!版本 | 已发布 | 发行说明 | |
---|---|---|---|
1.0.0 |