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手机配备有 ...
随机推荐
- J - 玩游戏
小A和小B玩游戏,初始的时候小A给小B一组包含n个数的数组.他们按如下的规则进行: 每次小B得到一组数,他把这组数的和加到自己的分数里面(他的初始分数是0),然后他把这组数还给小A. 如果小A得到的这 ...
- Android 信息提示——Toast方式
Toast用于向用户显示一些帮助/提示.一下列举了5中样式. 一.默认的效果(显示在屏幕的底部) 代码: Toast.makeText(getApplicationContext(), "默 ...
- SQLServer添加链接服务器
右键,添加链接服务器 在安全里面输入用户名和密码 添加成功之后的使用方法 select * from [192.168.1.63,3326].[数据库].[dbo].[表]
- ubuntu下如何查看和设置分辨率 (转载)
转自:http://blog.csdn.net/jcgu/article/details/8650423 在ubuntu下可以使用xrandr来设置自己需要的分辨率.大致步骤如下: 1.使用xrand ...
- PCB Windows Petya(永恒之蓝)勒索病毒补丁检测代码
公司内部电脑招受到新的勒索病毒Petya(永恒之蓝)攻击,直接导致受攻击的电脑系统崩贵无法启动,这次勒索病毒攻击影响范围之广,IT,人事,工程,生产,物控等部门都无一幸免,对整个公司运转产生了非常严重 ...
- 深入理解JWT的使用场景和优劣
前面简单介绍了JWT的基础只是和简单的小Demo,但是对于JWT的应用场景和优缺点掌握的还够,这些东西只有自己实践过才能搞清楚其中的细节.在网上看到一个大佬对这块讲的比较好,就转载过来一起学习下. 原 ...
- ActiveMQ 5.10.0 安装与配置
先在官网下载activeMQ,我这里是5.10.0. 然后在解压在一个文件夹下即可. 我这里是:D:\apache-activemq-5.10.0-bin 然后进入bin目录:D:\apache-ac ...
- Spring Cloud (11) Hystrix-监控聚合监控
上一篇利用Hystrix Dashboard去监控断路器的Hystrix command,当我们有很多服务的时候,就需要聚合所有服务的Hystrix Dashboard数据了,这就需要Hystrix ...
- VS2015环境配置: VS2015 未能正确加载“ResourceManagerPackage”包的问题
启动vs2015专业版时,出现类似于这样的提示框,有好几个,点击是或否,但下次打开还是会出现.笔者也寻找了网上的一些解决办法,例如用vs命令窗口或其他,但都无疾而终,下面提供的这个办法,顺利解决此问题 ...
- [ BZOJ 4318 & 3450 / CodeForces 235 B ] OSU!
\(\\\) \(Description\) 一共进行\(N\)次操作,生成一个长度为\(N\)的\(01\)序列,成功对应\(1\),失败对应\(0\),已知每一次操作的成功率\(p_i\). 在这 ...