<script type="text/javascript">
ml=new Array(31,28,31,30,31,30,31,31,30,31,30,31);
nm=new Array();
nm[0]=new Array(0,"0217","0318","0417","0517","0615","0715","0814","0912","1011","1110","1209","1308");
nm[1]=new Array(0,"0206","0308","0406","0506","0605","0704","0803","0901","1001","1030","1129","1228");
nm[2]=new Array(5,"0127","0225","0326","0424","0524","0622","0722","0820","0919","1019","1117","1217","1315");
nm[3]=new Array(0,"0214","0315","0414","0513","0611","0711","0810","0908","1008","1107","1206","1305");
nm[4]=new Array(0,"0203","0305","0403","0503","0601","0630","0730","0828","0927","1027","1125","1225");
nm[5]=new Array(3,"0124","0222","0324","0422","0522","0620","0719","0818","0916","1016","1114","1214","1313");
nm[6]=new Array(0,"0212","0312","0411","0510","0609","0708","0806","0905","1004","1103","1202","1301");
nm[7]=new Array(8,"0131","0302","0331","0430","0529","0628","0727","0825","0924","1023","1122","1221","1320");
nm[8]=new Array(0,"0218","0320","0419","0519","0617","0717","0815","0913","1013","1111","1211","1309");
nm[9]=new Array(0,"0208","0309","0408","0508","0606","0706","0804","0903","1002","1101","1130","1230");
nm[10]=new Array(6,"0128","0227","0327","0426","0525","0624","0724","0822","0921","1020","1119","1218","1317");
nm[11]=new Array(0,"0215","0317","0415","0515","0613","0713","0811","0910","1010","1108","1208","1306");
nm[12]=new Array(0,"0205","0306","0405","0504","0602","0702","0731","0830","0929","1028","1127","1227");
nm[13]=new Array(4,"0125","0224","0325","0424","0523","0621","0721","0819","0918","1017","1116","1216","1315");
nm[14]=new Array(0,"0213","0314","0412","0512","0610","0709","0808","0906","1006","1104","1204","1303");
nm[15]=new Array(0,"0202","0303","0402","0501","0531","0629","0728","0827","0925","1024","1123","1223");
nm[16]=new Array(3,"0121","0220","0322","0421","0520","0619","0718","0816","0915","1014","1112","1212","1311");
nm[17]=new Array(0,"0209","0311","0410","0509","0608","0708","0806","0904","1004","1102","1202","1231");
nm[18]=new Array(7,"0130","0228","0329","0427","0527","0626","0725","0824","0922","1022","1120","1220","1318");
nm[19]=new Array(0,"0217","0318","0417","0516","0615","0714","0813","0912","1011","1110","1209","1308");
nm[20]=new Array(0,"0206","0308","0406","0505","0604","0703","0802","0901","0930","1030","1129","1228");
nm[21]=new Array(5,"0127","0225","0327","0425","0524","0623","0722","0821","0919","1019","1118","1218","1316");
nm[22]=new Array(0,"0215","0315","0414","0513","0611","0711","0809","0908","1007","1106","1206","1304");
nm[23]=new Array(0,"0203","0305","0403","0503","0601","0630","0730","0828","0926","1026","1125","1224");
nm[24]=new Array(4,"0123","0222","0324","0422","0522","0620","0719","0818","0916","1015","1114","1214","1312");
nm[25]=new Array(0,"0211","0313","0412","0511","0610","0709","0807","0906","1005","1103","1203","1301");
nm[26]=new Array(8,"0131","0301","0331","0429","0529","0627","0727","0825","0924","1023","1121","1221","1319");
nm[27]=new Array(0,"0218","0320","0418","0518","0617","0716","0815","0913","1013","1111","1211","1309");
nm[28]=new Array(0,"0207","0309","0407","0507","0606","0705","0804","0903","1002","1101","1130","1230");
nm[29]=new Array(6,"0128","0227","0328","0426","0526","0624","0724","0823","0921","1021","1120","1219","1318");
nm[30]=new Array(0,"0216","0317","0415","0514","0613","0712","0811","0909","1009","1108","1207","1306");
nm[31]=new Array(0,"0205","0306","0405","0504","0602","0702","0731","0829","0928","1028","1126","1226");
nm[32]=new Array(4,"0125","0224","0325","0424","0523","0621","0721","0819","0917","1017","1115","1215","1314");
nm[33]=new Array(0,"0213","0315","0413","0513","0611","0710","0809","0907","1006","1105","1204","1303");
nm[34]=new Array(0,"0202","0303","0401","0501","0531","0629","0728","0827","0925","1024","1123","1222");
nm[35]=new Array(2,"0121","0220","0321","0420","0520","0618","0718","0816","0915","1014","1112","1212","1310");
nm[36]=new Array(0,"0209","0310","0409","0509","0607","0707","0806","0904","1004","1102","1202","1231");
nm[37]=new Array(6,"0129","0228","0329","0428","0527","0626","0726","0824","0923","1023","1121","1221","1319");
nm[38]=new Array(0,"0217","0318","0416","0516","0614","0714","0812","0911","1011","1109","1209","1308");
nm[39]=new Array(0,"0206","0308","0406","0505","0604","0703","0802","0831","0930","1029","1128","1228");
nm[40]=new Array(5,"0127","0225","0327","0425","0524","0623","0722","0820","0919","1018","1117","1217","1316");
nm[41]=new Array(0,"0215","0316","0415","0514","0612","0712","0810","0908","1008","1106","1206","1305");
nm[42]=new Array(0,"0204","0304","0403","0503","0601","0630","0730","0828","0926","1026","1124","1224");
nm[43]=new Array(3,"0123","0221","0323","0422","0521","0620","0719","0818","0916","1015","1114","1213","1312");
nm[44]=new Array(0,"0210","0312","0411","0511","0609","0709","0807","0906","1005","1103","1203","1301");
nm[45]=new Array(8,"0131","0301","0331","0430","0529","0628","0727","0826","0925","1024","1122","1222","1320");
nm[46]=new Array(0,"0219","0319","0418","0517","0616","0716","0814","0913","1012","1111","1211","1309");
nm[47]=new Array(0,"0207","0309","0407","0507","0605","0705","0803","0902","1002","1031","1130","1230");
nm[48]=new Array(5,"0128","0227","0328","0426","0526","0624","0723","0822","0921","1020","1119","1219","1317");
nm[49]=new Array(0,"0216","0318","0416","0515","0614","0713","0811","0910","1009","1108","1208","1307");
function length(y,m){
if((m==2)&&((y+50)%4==0)) return 29;
else return ml[(m+11)%12];
}
function ctog(form){
y=formyearselectedIndex;
m=formmonthselectedIndex+1;
d=formdayselectedIndex+1;
if((formrchecked)&&(m!=nm[y][0])){
formanswervalue="不存在这个日期";
return;
}
if(((formrchecked)&&(m==nm[y][0]))||((nm[y][0]>0)&&(m>nm[y][0]))) m=m+1;
outm=Number(nm[y][m]substring(0,2));
outd=Number(nm[y][m]substring(2,4))+d-1;
if(outd>length(y,outm)){
outd=outd-length(y,outm);
outm=outm+1;
}
outy=y+1950;
if(outm>12){
outm=outm-12;
outy=outy+1;
}
formanswervalue=""+outy+"-"+outm+"-"+outd+"";
}
function gtoc(form){
y=formyearselectedIndex;
m=formmonthselectedIndex+1;
d=formdayselectedIndex+1;
if(d>length(y,m)){
formanswervalue="不存在这个日期";
return;
}
md=String(d);
if (mdlength<2) md="0"+md;
md=String(m)+md;
if (mdlength<4) md="0"+md;
for(i=0;i<=12;i++) {
if((Number(nm[y][i+1])>Number(md))||(i+1==nm[y]length)) break;
}
if(i==0){
if(y==0){
formanswervalue="超出计算范围";
return;
}
y=y-1;
i=(nm[y]length)-1;
md=String(Number(md)+1200);
if(Number(nm[y][i])>Number(md)) i=i-1;
}
if(nm[y][i]substring(0,2)==mdsubstring(0,2)) outd=Number(mdsubstring(2,4))-Number(nm[y][i]substring(2,4))+1;
else outd=length(y,Number(nm[y][i]substring(0,2)))+Number(mdsubstring(2,4))-Number(nm[y][i]substring(2,4))+1;
outm=i;
r="";
if(nm[y][0]!=0){
if(outm==nm[y][0]+1) rn="闰";
if(outm>nm[y][0]) outm=outm-1;
}
outy=y+1950;
formanswervalue="农历"+outy+"年"+r+outm+"月"+outd+"日";
}
</script>
<form>
农历日期:19 <select size="1" name="year">
<option>50</option>
<option>51</option>
<option>52</option>
<option>53</option>
<option>54</option>
<option>55</option>
<option>56</option>
<option>57</option>
<option>58</option>
<option>59</option>
<option>60</option>
<option>61</option>
<option>62</option>
<option>63</option>
<option>64</option>
<option>65</option>
<option>66</option>
<option>67</option>
<option>68</option>
<option>69</option>
<option>70</option>
<option>71</option>
<option>72</option>
<option>73</option>
<option>74</option>
<option>75</option>
<option>76</option>
<option>77</option>
<option>78</option>
<option>79</option>
<option selected="selected">80</option>
<option>81</option>
<option>82</option>
<option>83</option>
<option>84</option>
<option>85</option>
<option>86</option>
<option>87</option>
<option>88</option>
<option>89</option>
<option>90</option>
<option>91</option>
<option>92</option>
<option>93</option>
<option>94</option>
<option>95</option>
<option>96</option>
<option>97</option>
<option>98</option>
<option>99</option>
</select> 年 <select size="1" name="month">
<option selected="selected">1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
<option>6</option>
<option>7</option>
<option>8</option>
<option>9</option>
<option>10</option>
<option>11</option>
<option>12</option>
</select> 月 <select size="1" name="day">
<option selected="selected">1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
<option>6</option>
<option>7</option>
<option>8</option>
<option>9</option>
<option>10</option>
<option>11</option>
<option>12</option>
<option>13</option>
<option>14</option>
<option>15</option>
<option>16</option>
<option>17</option>
<option>18</option>
<option>19</option>
<option>20</option>
<option>21</option>
<option>22</option>
<option>23</option>
<option>24</option>
<option>25</option>
<option>26</option>
<option>27</option>
<option>28</option>
<option>29</option>
<option>30</option>
</select> 日 <input type="checkbox" name="r" value="on"/> 闰月 <input onclick="ctog(thisform)" type="button" name="cg" value="转换为阳历"/> <input style="COLOR: red" size="12" name="answer"/>
</form>
我有个JS的要么?
你可以把他改下我是没时间帮你该哈!!!
!--日期框选择-->>
var DS_x,DS_y;
function dateSelector() //构造dateSelector对象,用来实现一个日历形式的日期输入框。
{
var myDate=new Date();
thisyear=myDategetFullYear(); //定义year属性,年份,默认值为当前系统年份。
thismonth=myDategetMonth()+1; //定义month属性,月份,默认值为当前系统月份。
thisdate=myDategetDate(); //定义date属性,日,默认值为当前系统的日。
thisinputName=''; //定义inputName属性,即输入框的name,默认值为空。注意:在同一页中出现多个日期输入框,不能有重复的name!
thisdisplay=display; //定义display方法,用来显示日期输入框。
}
function display() //定义dateSelector的display方法,它将实现一个日历形式的日期选择框。
{
var week=new Array('日','一','二','三','四','五','六');
documentwrite("<style type=text/css>");
documentwrite(" ds_font td,span { font: normal 12px 宋体; color: #000000; }");
documentwrite(" ds_border { border: 1px solid #000000; cursor: hand; background-color: #DDDDDD }");
documentwrite(" ds_border2 { border: 1px solid #000000; cursor: hand; background-color: #DDDDDD }");
documentwrite("</style>");
var M=new String(thismonth);
var d=new String(thisdate);
if(Mlength==1&&dlength==1){
documentwrite("<input style='text-align:center;' id='DS_"+thisinputName+"' name='"+thisinputName+"' value='"+thisyear+"-0"+thismonth+"-0"+thisdate+"' title=双击可进行编缉 ondblclick='thisreadOnly=false;thisfocus()' onblur='thisreadOnly=true' readonly>");}
else if(Mlength==1&&dlength==2){
documentwrite("<input style='text-align:center;' id='DS_"+thisinputName+"' name='"+thisinputName+"' value='"+thisyear+"-0"+thismonth+"-"+thisdate+"' title=双击可进行编缉 ondblclick='thisreadOnly=false;thisfocus()' onblur='thisreadOnly=true' readonly>");}
else if(Mlength==2&&dlength==1){
documentwrite("<input style='text-align:center;' id='DS_"+thisinputName+"' name='"+thisinputName+"' value='"+thisyear+"-"+thismonth+"-0"+thisdate+"' title=双击可进行编缉 ondblclick='thisreadOnly=false;thisfocus()' onblur='thisreadOnly=true' readonly>");}
else if(Mlength==2&&dlength==2){
documentwrite("<input style='text-align:center;' id='DS_"+thisinputName+"' name='"+thisinputName+"' value='"+thisyear+"-"+thismonth+"-"+thisdate+"' title=双击可进行编缉 ondblclick='thisreadOnly=false;thisfocus()' onblur='thisreadOnly=true' readonly>");}
documentwrite("<button style='width:60px;height:18px;font-size:12px;margin:1px;border:1px solid #A4B3C8;background-color:#DFE7EF;' type=button onclick=thisnextSiblingstyledisplay='block' onfocus=thisblur()>日期</button>");
documentwrite("<div style='position:absolute;display:none;text-align:center;width:0px;height:0px;overflow:visible' onselectstart='return false;'>");
documentwrite(" <div style='position:absolute;left:-60px;top:20px;width:142px;height:165px;background-color:#F6F6F6;border:1px solid #245B7D;' class=ds_font>");
documentwrite(" <table cellpadding=0 cellspacing=1 width=140 height=20 bgcolor=#CEDAE7 onmousedown='DS_x=eventx-parentNodestylepixelLeft;DS_y=eventy-parentNodestylepixelTop;setCapture();' onmouseup='releaseCapture();' onmousemove='dsMove(thisparentNode)' style='cursor:move;'>");
documentwrite(" <tr align=center>");
documentwrite(" <td width=12% onmouseover=thisclassName='ds_border' onmouseout=thisclassName='' onclick=subYear(this) title='减小年份'><<</td>");
documentwrite(" <td width=12% onmouseover=thisclassName='ds_border' onmouseout=thisclassName='' onclick=subMonth(this) title='减小月份'><</td>");
documentwrite(" <td width=52%><b>"+thisyear+"</b><b>年</b><b>"+thismonth+"</b><b>月</b></td>");
documentwrite(" <td width=12% onmouseover=thisclassName='ds_border' onmouseout=thisclassName='' onclick=addMonth(this) title='增加月份'>></td>");
documentwrite(" <td width=12% onmouseover=thisclassName='ds_border' onmouseout=thisclassName='' onclick=addYear(this) title='增加年份'>>></td>");
documentwrite(" </tr>");
documentwrite(" </table>");
documentwrite(" <table cellpadding=0 cellspacing=0 width=140 height=20 onmousedown='DS_x=eventx-parentNodestylepixelLeft;DS_y=eventy-parentNodestylepixelTop;setCapture();' onmouseup='releaseCapture();' onmousemove='dsMove(thisparentNode)' style='cursor:move;'>");
documentwrite(" <tr align=center>");
for(i=0;i<7;i++)
documentwrite(" <td>"+week[i]+"</td>");
documentwrite(" </tr>");
documentwrite(" </table>");
documentwrite(" <table cellpadding=0 cellspacing=2 width=140 bgcolor=#EEEEEE>");
for(i=0;i<6;i++)
{
documentwrite(" <tr align=center>");
for(j=0;j<7;j++)
documentwrite(" <td width=10% height=16 onmouseover=if(thisinnerText!=''&&thisclassName!='ds_border2')thisclassName='ds_border' onmouseout=if(thisclassName!='ds_border2')thisclassName='' onclick=getValue(this,documentall('DS_"+thisinputName+"'))></td>");
documentwrite(" </tr>");
}
documentwrite(" </table>");
documentwrite(" <span style=cursor:hand onclick=thisparentNodeparentNodestyledisplay='none'>关闭</span>");
documentwrite(" </div>");
documentwrite("</div>");
dateShow(documentall("DS_"+thisinputName)nextSiblingnextSiblingchildNodes[0]childNodes[2],thisyear,thismonth)
}
function subYear(obj) //减小年份
{
var myObj=objparentNodeparentNodeparentNodecells[2]childNodes;
myObj[0]innerHTML=eval(myObj[0]innerHTML)-1;
dateShow(objparentNodeparentNodeparentNodenextSiblingnextSibling,eval(myObj[0]innerHTML),eval(myObj[2]innerHTML))
}
function addYear(obj) //增加年份
{
var myObj=objparentNodeparentNodeparentNodecells[2]childNodes;
myObj[0]innerHTML=eval(myObj[0]innerHTML)+1;
dateShow(objparentNodeparentNodeparentNodenextSiblingnextSibling,eval(myObj[0]innerHTML),eval(myObj[2]innerHTML))
}
function subMonth(obj) //减小月份
{
var myObj=objparentNodeparentNodeparentNodecells[2]childNodes;
var month=eval(myObj[2]innerHTML)-1;
if(month==0)
{
month=12;
subYear(obj);
}
myObj[2]innerHTML=month;
dateShow(objparentNodeparentNodeparentNodenextSiblingnextSibling,eval(myObj[0]innerHTML),eval(myObj[2]innerHTML))
}
function addMonth(obj) //增加月份
{
var myObj=objparentNodeparentNodeparentNodecells[2]childNodes;
var month=eval(myObj[2]innerHTML)+1;
if(month==13)
{
month=1;
addYear(obj);
}
myObj[2]innerHTML=month;
dateShow(objparentNodeparentNodeparentNodenextSiblingnextSibling,eval(myObj[0]innerHTML),eval(myObj[2]innerHTML))
}
function dateShow(obj,year,month) //显示各月份的日
{
var myDate=new Date(year,month-1,1);
var today=new Date();
var day=myDategetDay();
var selectDate=objparentNodeparentNodepreviousSiblingpreviousSiblingvaluesplit('-');
var length;
switch(month)
{
case 1:
case 3:
case 5:
case 7:
case 8:
case 10:
case 12:
length=31;
break;
case 4:
case 6:
case 9:
case 11:
length=30;
break;
case 2:
if((year%4==0)&&(year%100!=0)||(year%400==0))
length=29;
else
length=28;
}
for(i=0;i<objcellslength;i++)
{
objcells[i]innerHTML='';
objcells[i]stylecolor='';
objcells[i]className='';
}
for(i=0;i<length;i++)
{
objcells[i+day]innerHTML=(i+1);
if(year==todaygetFullYear()&&(month-1)==todaygetMonth()&&(i+1)==todaygetDate())
objcells[i+day]stylecolor='red';
if(year==eval(selectDate[0])&&month==eval(selectDate[1])&&(i+1)==eval(selectDate[2]))
objcells[i+day]className='ds_border2';
}
}
function getValue(obj,inputObj) //把选择的日期传给输入框
{
var myObj=inputObjnextSiblingnextSiblingchildNodes[0]childNodes[0]cells[2]childNodes;
if(objinnerHTML)
if(objinnerHTMLlength==1&&myObj[2]innerHTMLlength==1)
inputObjvalue=myObj[0]innerHTML+"-0"+myObj[2]innerHTML+"-0"+objinnerHTML;
else if(objinnerHTMLlength==1&&myObj[2]innerHTMLlength==2)
inputObjvalue=myObj[0]innerHTML+"-"+myObj[2]innerHTML+"-0"+objinnerHTML;
else if(objinnerHTMLlength==2&&myObj[2]innerHTMLlength==1)
inputObjvalue=myObj[0]innerHTML+"-0"+myObj[2]innerHTML+"-"+objinnerHTML;
else if(objinnerHTMLlength==2&&myObj[2]innerHTMLlength==2)
inputObjvalue=myObj[0]innerHTML+"-"+myObj[2]innerHTML+"-"+objinnerHTML;
inputObjnextSiblingnextSiblingstyledisplay='none';
for(i=0;i<objparentNodeparentNodeparentNodecellslength;i++)
objparentNodeparentNodeparentNodecells[i]className='';
objclassName='ds_border2'
}
function dsMove(obj) //实现层的拖移
{
if(eventbutton==1)
{
var X=objclientLeft;
var Y=objclientTop;
objstylepixelLeft=X+(eventx-DS_x);
objstylepixelTop=Y+(eventy-DS_y);
}
}
/调用代码
<script language=javascript>
var myDate=new dateSelector();
myDateyear=1900;//morenqiri
myDateinputName='date'; //
myDatedisplay();
</script>
/
2023年iPhone日历订阅:中国节假日调休+常用节日+国际节日!

他们都叫我柯基
这篇文章我会长期更新,2023年、2024年、2025年···,保证订阅能长期有效,因为我自己也在用。
平时我看日期用的都是 iPhone 自带的日历,我都不想吐槽了,真心难用!虽然简洁无广告吧,但很多节日根本没有,比如母亲节、父亲节、情人节等,而且更新也不及时,很不方便。
最近苹果升级了自带日历的订阅,将中国节假日调休加了进去,但是节日信息依旧不全,而且体验也没很完美,所以我在原生订阅基础上做了优化。
我做了两个日历订阅,分别对应 iOS 15、iOS 16,这两个订阅能完美弥补对应系统下日历的缺陷。
一、柯基日历增强包(iOS 16)
➔ 点击这里获取订阅链接,我会每年保持更新。
该日历仅针对 iOS 16,柯基日历增强包中包含了:中国传统节日、国际节日。
★ 新增中国传统节日/国际节日共15个:母亲节、父亲节、情人节、腊八节、北方小年、南方小年、植树节、愚人节、中元节、教师节、万圣夜、万圣节、感恩节、平安夜、圣诞节。
使用建议:
因为在 iOS 16 系统下,使用苹果自带的日历订阅会有休/班的角标,所以大家一定要把默认的"中国节假日"勾选起来。
但是这个默认订阅有个缺陷,就是没有母亲节、父亲节、情人节等这些重要节日。
所以,我专门给 iOS 16 的小伙伴们做了个柯基日历增强包,这个增强包可以完美弥补默认日历的缺陷。订阅后把下图中两个日历都勾选上即可。
苹果自带的中国节假日订阅,一般会在每年年底更新,等更新之后,法定节假日及调休就会有休/班的角标,配合我的日历增强包,体验更完美。
二、柯基日历订阅(iOS 15)
➔ 点击这里获取订阅链接,我会每年保持更新。
柯基日历订阅中包含:中国节假日安排、二十四节气、中国传统节日、国际节日。
★优化中国节假日安排:增加了第几天,示例,元旦(休)第1天/共3天
★新增中国传统节日/国际节日共15个:母亲节、父亲节、情人节、腊八节、北方小年、南方小年、植树节、愚人节、中元节、教师节、万圣夜、万圣节、感恩节、平安夜、圣诞节。
使用建议:
虽然目前苹果自带的日历订阅已经加上了节假日安排,但是 iOS 15 系统下的日历没有休/班的角标,所以很难判断当前是休/班的第几天,而且节日也不全。
所以我的建议是 iOS 15 及以下系统,直接订阅柯基日历,然后仅勾选"柯基日历订阅",取消勾选默认的"中国节假日"。
改3个地方就可以了。
1把PrintMonthCalender()中的
for(;i<=m;i++)
{
startDay++;
printf("\t%d",i);
if(startDay==6)
printf("\n");
}
改成
for(;i<=m;i++){
if(startDay++==6){
printf("\n");
startDay=0;
}
printf("\t%d",i);
}
2把GetMonthDays()中的
case 2:
if(c==1)
return 29 ;break;
if(c==0)
return 28 ;break;
改成
case 2:
if(c==1) return 29;
else return 28;
3 把GetWeekDay()中的
case 2: result+=30;
改成
case 2: result+=28;
并把
if (c==1)
result++;
改成if(c==1 && month>2) result++;
再把凡是紧跟在return后面的break删除;在system("pause")前加一句printf("\n")就OK了……
Privacy - Calendars Usage Description / 有助于您更好的管理日程
通过 eventcalendarallowsContentModifications == YES 可以过滤节假日、节气等系统添加的日历。
由于我们手动添加的数据都是可以手动编辑的,所以event的allowsContentModifications这一只读属性刚好可以用到。
根据eventIdentifier 查找对应日历,没找到则重新创建,找如果有先删除在重新创建。
(1)唯一事件id(eventIdentifier)只读的问题:事件创建之后,系统自动创建eventIdentifier,而我们无法准确找到对应事件的 eventIdentifier。
(2)获取本地日历中的日程数据数据量可能会很大,导致与服务端返回的新数据进行匹配的时候双重for循环影响效率。
解决方案 :使用allowsContentModifications属性。由于我们手动添加的数据都是可以手动编辑的,所以event的allowsContentModifications这一只读属性刚好可以用到。可以减少很多系统日历自带的event对象,比如节假日、节气等等。
(1)基于地理位置的提醒
我们可以设定当用户进入或离开指定的地理位置区域时,触发日程提醒。例如当用户离开公司,提醒用户需要到超市购买日用品,作为开发者,需要确定一个经纬度以及一个半径范围。
1、 iOS 添加项目到系统日历
2、 iOS增、删、改、查系统提醒事件和日历事件
3、 iOS—EventKit实现app日程同步到本地日历(唯一id,过滤节假日)
这个是日历的源代码:
<div id="mod_cals" class="mod" rel="drag">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="modth">
<tr><td class="modtl" width="7"> </td>
<td class="modtc" nowrap><div class="modhead"><span class="modtit">日历</span></div></td>
<td class="modtc" nowrap align="right">
<div class="modopt"> </div>
</td>
<td class="modtr" width="7"> </td>
</tr></table>
<div id="m_cals" class="modbox">
<!--日历调用开始-->
<div id="cals"></div>
<div id="cals_script" style="display:none;"></div>
<script language="javascript" type="text/javascript" src="/js/caljs"></script>
<script language="javascript">
//
var cal1=new cal("cals");
var g_url_s=">
以上就是关于求日历转换的代码全部的内容,包括:求日历转换的代码、求Java万年历源代码!!!、中国节假日苹果日历代码等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)