`

Java 设定工作日日历

阅读更多

开发清单

  • JDK 1.7
  • Servlet 3.0
  • JSP
  • Dom4j 1.6.1
  • FullCanlendar 3

    后台考虑兼容性,并没有使用数据库,而是采用xml格式存储数据,毕竟一年只有365天,点击FullCanlendar的某一天,设置为休息日,再次点击取消。


XML格式为:

<?xml version="1.0" encoding="UTF-8"?>

<roots xmlns="http://www.phpStudy.net" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.phpStudy.net note.xsd">  
  <event ID="S2016-12-11" start="2016-12-11" title="休息日"/>  
  <event ID="S2016-12-04" start="2016-12-04" title="休息日"/>  
  <event ID="S2016-12-03" start="2016-12-03" title="休息日"/>  
  <event ID="S2016-12-10" start="2016-12-10" title="休息日"/>  
  <event ID="S2016-12-17" start="2016-12-17" title="休息日"/>  
  <event ID="S2016-12-18" start="2016-12-18" title="休息日"/>  
  <event ID="S2016-12-24" start="2016-12-24" title="休息日"/>  
  <event ID="S2016-12-25" start="2016-12-25" title="休息日"/>  
  <event ID="S2016-12-31" start="2016-12-31" title="休息日"/>  
  <event ID="S2017-01-01" start="2017-01-01" title="休息日"/> 
</roots>

 
 约束文档

<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.phpStudy.net"
xmlns="http://www.phpStudy.net"
elementFormDefault="qualified">

<xs:element name="roots">
    <xs:complexType>
      <xs:sequence>
		<xs:element name="event" minOccurs="0" maxOccurs="366" >
			<xs:complexType>
				<xs:attribute name="ID" type="xs:ID" />
				<xs:attribute name="title" type="xs:string" />
			</xs:complexType>
		</xs:element>
      </xs:sequence>
    </xs:complexType>
</xs:element>


</xs:schema>

 关键代码,下载附件吧。思路很重要,维护政府工作日历一直是一个问题,那么有了这个会不会好一些呢?

 详细地址:http://www.cnblogs.com/dbcsd/p/6229361.html

  • 大小: 23.8 KB
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics