C++编写谷歌日历
#include<iostream>
#include<fstream>
using namespace std;
void main() //程序从这里开始运行
{
int day; ofstream fout("D:\jixingkebiao.ics"); //基本内容输入
fout << "BEGIN:VCALENDAR" << endl;
fout << "PRODID:-//Google Inc//Google Calendar 70.9054//EN" << endl;
fout << "VERSION:2.0" << endl;
fout << "CALSCALE:GREGORIAN" << endl;
fout << "METHOD:PUBLISH" << endl;
fout << "X-WR-CALNAME:课程表" << endl;
fout << "X-WR-TIMEZONE:Asia/Shanghai" << endl; //输入英语课表
for (int t = ; t < ; t++)
{
day = ;
fout << "BEGIN:VEVENT" << endl;
if (t == ) { fout << "DTSTART:2018030" << day << "T000000Z" << endl;
fout << "DTEND:2018030" << day << "T013500Z" << endl;
fout << "LOCATION:北综楼 111/胡冬梅" << endl;
fout << "RRULE:FREQ=WEEKLY;UNTIL=20180604T155959Z" << endl;
}
else
{
fout << "DTSTART:2018030" << day + << "T020500Z" << endl;
fout << "DTEND:2018030" << day + << "T034000Z" << endl;
fout << "LOCATION:北综楼 111/胡冬梅" << endl;
fout << "RRULE:FREQ=WEEKLY;UNTIL=20180607T155959Z" << endl;
} fout << "DESCRIPTION:" << endl;
fout << "SEQUENCE:0" << endl;
fout << "STATUS:CONFIRMED" << endl;
fout << "SUMMARY:大学英语" << endl;
fout << "TRANSP:OPAQUE" << endl;
fout << "END:VEVENT" << endl;
}
//输入数字逻辑课表
for (int t = ; t < ; t++)
{
day = ;
fout << "BEGIN:VEVENT" << endl;
if (t == ) { fout << "DTSTART:2018030" << day << "T020500Z" << endl;
fout << "DTEND:2018030" << day << "T034000Z" << endl;
fout << "LOCATION:综合楼303/墙威" << endl;
fout << "RRULE:FREQ=WEEKLY;UNTIL=20180507T155959Z" << endl;
}
else { fout << "DTSTART:2018030" << day + << "T060000Z" << endl;
fout << "DTEND:2018030" << day + << "T073500Z" << endl;
fout << "LOCATION:综合楼408/墙威" << endl;
fout << "RRULE:FREQ=WEEKLY;UNTIL=20180509T155959Z" << endl; } fout << "DESCRIPTION:" << endl;
fout << "SEQUENCE:0" << endl;
fout << "STATUS:CONFIRMED" << endl;
fout << "SUMMARY:数字逻辑" << endl;
fout << "TRANSP:OPAQUE" << endl;
fout << "END:VEVENT" << endl;
}
//输入高等数学课表
day = ; for (int t = ; t < ; t++)
{
fout << "BEGIN:VEVENT" << endl;
if (t == ) { fout << "DTSTART:2018030" << day << "T060000Z" << endl;
fout << "DTEND:2018030" << day << "T073500Z" << endl;
fout << "LOCATION:综合楼303/李少华" << endl;
fout << "RRULE:FREQ=WEEKLY;UNTIL=20180702T155959Z" << endl;
}
else if (t == )
{
fout << "DTSTART:2018030" << day + << "T000000Z" << endl;
fout << "DTEND:2018030" << day + << "T013500Z" << endl;
fout << "LOCATION:综合楼304/李少华" << endl;
fout << "RRULE:FREQ=WEEKLY;UNTIL=20180704T155959Z" << endl;
}
else if (t == )
{
fout << "DTSTART:2018030" << day + << "T060000Z" << endl;
fout << "DTEND:2018030" << day + << "T073500Z" << endl;
fout << "LOCATION:综合楼207/李少华" << endl;
fout << "RRULE:FREQ=WEEKLY;UNTIL=20180706T155959Z" << endl;
}
fout << "DESCRIPTION:" << endl;
fout << "SEQUENCE:0" << endl;
fout << "STATUS:CONFIRMED" << endl;
fout << "SUMMARY:高等数学" << endl;
fout << "TRANSP:OPAQUE" << endl;
fout << "END:VEVENT" << endl;
}
//输入电工与电子技术课表 day = ; for (int t = ; t < ; t++)
{
fout << "BEGIN:VEVENT" << endl;
if (t == ) { fout << "DTSTART:2018030" << day << "T000000Z" << endl;
fout << "DTEND:2018030" << day << "T013500Z" << endl;
fout << "LOCATION:综合楼307/胡志敏" << endl;
fout << "RRULE:FREQ=WEEKLY;UNTIL=20180508T155959Z" << endl;
}
else
{ fout << "DTSTART:2018030" << day + << "T000000Z" << endl;
fout << "DTEND:2018030" << day + << "T013500Z" << endl;
fout << "LOCATION:综合楼111/胡志敏" << endl;
fout << "RRULE:FREQ=WEEKLY;UNTIL=20180510T155959Z" << endl; } fout << "DESCRIPTION:" << endl;
fout << "SEQUENCE:0" << endl;
fout << "STATUS:CONFIRMED" << endl;
fout << "SUMMARY:电工与电子技术" << endl;
fout << "TRANSP:OPAQUE" << endl;
fout << "END:VEVENT" << endl;
} //输入离散数学课表 day = ; for (int t = ; t < ; t++)
{
fout << "BEGIN:VEVENT" << endl;
if (t == ) {
fout << "DTSTART:2018040" << day << "T060000Z" << endl;
fout << "DTEND:2018040" << day << "T073500Z" << endl;
fout << "LOCATION:教一楼503/吴亦奇" << endl;
fout << "RRULE:FREQ=WEEKLY;UNTIL=20180703T155959Z" << endl;
}
else
{
fout << "DTSTART:2018040" << day + << "T000000Z" << endl;
fout << "DTEND:2018040" << day + << "T013500Z" << endl;
fout << "DESCRIPTION:" << endl;
fout << "LOCATION:教一楼404/吴亦奇" << endl;
fout << "RRULE:FREQ=WEEKLY;UNTIL=20180706T155959Z" << endl; }
fout << "DESCRIPTION:" << endl;
fout << "SEQUENCE:0" << endl;
fout << "STATUS:CONFIRMED" << endl;
fout << "SUMMARY:离散数学" << endl;
fout << "TRANSP:OPAQUE" << endl;
fout << "END:VEVENT" << endl;
}
//输入地球科学概论课表 day = ; for (int t = ; t < ; t++)
{
fout << "BEGIN:VEVENT" << endl;
if (t == ) { fout << "DTSTART:2018030" << day << "T110000Z" << endl;
fout << "DTEND:2018030" << day << "T123500Z" << endl;
fout << "LOCATION:综合楼410/任利民" << endl;
fout << "RRULE:FREQ=WEEKLY;UNTIL=20180424T155959Z" << endl;
}
else
{
fout << "DTSTART:2018030" << day + << "T110000Z" << endl;
fout << "DTEND:2018030" << day + << "T123500Z" << endl;
fout << "LOCATION:综合楼106/任利民" << endl;
fout << "RRULE:FREQ=WEEKLY;UNTIL=20180426T155959Z" << endl;
} fout << "DESCRIPTION:" << endl;
fout << "SEQUENCE:0" << endl;
fout << "STATUS:CONFIRMED" << endl;
fout << "SUMMARY:地球科学概论" << endl;
fout << "TRANSP:OPAQUE" << endl;
fout << "END:VEVENT" << endl;
}
//输入体育课课表 day = ; fout << "BEGIN:VEVENT" << endl; fout << "DTSTART:2018030" << day << "T020500Z" << endl;
fout << "DTEND:2018030" << day << "T034000Z" << endl;
fout << "RRULE:FREQ=WEEKLY;UNTIL=20180704T155959Z" << endl;
fout << "LOCATION:北区体育馆/袁春梅" << endl;
fout << "DESCRIPTION:" << endl;
fout << "SEQUENCE:0" << endl;
fout << "STATUS:CONFIRMED" << endl;
fout << "SUMMARY:乒乓球初级班" << endl;
fout << "TRANSP:OPAQUE" << endl;
fout << "END:VEVENT" << endl; //输入高级软件编程技术课表 day = ;
for (int t = ; t < ; t++)
{
fout << "BEGIN:VEVENT" << endl;
if (t == ) { fout << "DTSTART:201805" << day << "T060000Z" << endl;
fout << "DTEND:201805" << day << "T073500Z" << endl;
fout << "LOCATION:教一楼408/熊慕舟" << endl;
fout << "RRULE:FREQ=WEEKLY;UNTIL=20180627T155959Z" << endl;
}
else
{
fout << "DTSTART:201805" << day + << "T020500Z" << endl;
fout << "DTEND:201805" << day + << "T034000Z" << endl;
fout << "LOCATION:教一楼408/熊慕舟" << endl;
fout << "RRULE:FREQ=WEEKLY;UNTIL=20180627T155959Z" << endl;
}
fout << "DESCRIPTION:" << endl;
fout << "SEQUENCE:0" << endl;
fout << "STATUS:CONFIRMED" << endl;
fout << "SUMMARY:高级软件编程技术" << endl;
fout << "TRANSP:OPAQUE" << endl;
fout << "END:VEVENT" << endl;
} fout << "END:VCALENDAR";
fout.close(); return; }
C++编写谷歌日历的更多相关文章
- Ubuntu 中使用 谷歌日历
简介 对于经常使用待办类软件的人来说,谷歌日历是个不错的选择.但每次,都要登录网页去查看,对于我这样的懒人来说似乎麻烦了些. 所以在网上找了个叫做 Calendar Indicator 的软件. 效果 ...
- c语言编写的日历
输入年份如2013,显示2013年的日历. 思路: 1.查找每个月1号是星期几(这里利用了1990年1月1号是星期一) 计算年份如2013年1月1号到1990年1月1号有Days天,Day%7得到星期 ...
- html编写的日历
1.html (1) <html> <head> <meta http-equiv="Content-Type" content="text ...
- Java编写的日历,输入年月,输出这个月的日期与星期
import java.util.Scanner; public class rili { public static void main(String[] args) { for (int g = ...
- java编写本月日历
代码如下: import java.time.*; public class Main { public static void main(String arg[]){ LocalDate date ...
- 用JS编写日历的简单思路
提要:本文以写当前时间环境下当月的日历表为例,用最简单的方法实现JavaScript日历,旨在展示JS世界中实用为本.简单为上的解决问题的思路. Web页中的日历一般离不开表格,通常都使用表格装载指定 ...
- 日历组件 原生js
自己基于原生js编写的日历组件 git地址: https://github.com/lihefen/calendar.git demo : https://lihefen.github.io/cale ...
- Google Calendar(日历)设置农历生日提醒
Generate birthday dates base on lunar birthdays for google calendar import Can be used for notifying ...
- 调用Android自带日历功能(日历列表单、添加一个日历事件)
调用Android自带日历功能 觉得这篇文章不错,转载过来. 转载:http://blog.csdn.net/djy1992/article/details/9948393 Android手机配备有 ...
随机推荐
- Test While You Sleep (and over Weekends)
Test While You Sleep (and over Weekends) Rajith Attapattu RELAX. I am not referring to offshore deve ...
- poj1852ant
题意是这种,有一堆蚂蚁在一根棍子上乱爬.速度都是一样的,假设它们撞到了一起就会朝反方向爬去. 把棍子长度告诉你.还有蚂蚁的数量以及它们某时的距离棍子左端的距离.要求全部蚂蚁都掉到棍子以下去 的最小可能 ...
- expect安装测试-批量用户管理
安装: yum list | grep expect yum install expect 批量创建用户: ansible mysqldb -m user -a 'name=ansible state ...
- 大神是如何装逼的 之 vim插件使用taglist和nerdtree
本文转载自:http://blog.csdn.net/yaoxingshuai/article/details/51385332 本文主要讲述如何在vim下配置taglist,nerdtree(看代码 ...
- P2597 [ZJOI2012]灾难 拓扑排序
这个题有点意思,正常写法肯定会T,然后需要优化.先用拓扑排序重构一遍树,然后进行一个非常神奇的操作:把每个点放在他的食物的lca上,然后计算的时候直接dfs全加上就行了.为什么呢,因为假如你的食物的l ...
- Olddriver’s books
Olddriver 的书多的吓人,什么算法导论,组合数学英 文版(orz)......他把 n 本书都放在身后的桌子上, 每本书有一定的面积,并且书可以覆盖,求 n 本书覆盖桌面 的面积 输入格式: ...
- c3p0-config.xml文件简单说明与备忘
<?xml version="1.0" encoding="UTF-8"?> <c3p0-config> <named-confi ...
- [Swift通天遁地]七、数据与安全-(18)使用Swift实现原生的MD5加密
★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★➤微信公众号:山青咏芝(shanqingyongzhi)➤博客园地址:山青咏芝(https://www.cnblogs. ...
- [Swift通天遁地]九、拔剑吧-(6)使用开源类库快速搭建强大的侧边栏项目
★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★➤微信公众号:山青咏芝(shanqingyongzhi)➤博客园地址:山青咏芝(https://www.cnblogs. ...
- ARM VM安装Linux Diagnostic 2.3扩展
目前创建的Azure Linux虚拟机默认安装的是LAD 3.0,如果客户有特殊需求,可以通过如下方法安装LAD 2.3 1.在Azure Portal卸载LAD 3.0 2.使用Azure Powe ...