C++编写谷歌日历
2024-09-04 21:46:47
#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; }
最新文章
- python学习笔记(基础一:&#39;hello world&#39;、变量、字符编码)
- Linux一些零碎
- Linux(CentOS)系统下设置nginx开机自启动
- Spring和cxf3的整合,以maven的方式
- grootJs 系统常用API接受
- linux shell send and receive emails
- 利用ajax获取到的网页源码不能执行js代码
- 使用JS制作一个鼠标可拖的DIV(三)——移动带图片DIV
- FCLK PCLK HCLK
- Array,ArrayList 和 List<;T>;的选择和性能比较.
- [原创作品]一个实用的js倒计时器 postby:zhutty.cnblogs.com
- Android使用的开发MediaRecorder录制声音
- [转帖]漫画趣解Linux内核
- hibernate框架学习之数据抓取(加载)策略
- ABP+AdminLTE+Bootstrap Table权限管理系统第六节--abp控制器扩展及json封装以及6种处理时间格式化的方法
- JVM Internals
- C语言奇淫技巧,字符串的三种表示方法,不会用不是合格的程序员
- 苹果的浏览器safari无法识别 2016-1-1这样的日期,会返回Invalid Date
- JAVA Debug 调试代码
- ie浏览器 vuejs axios Promise 未定义