203 lines
8.3 KiB
HTML
203 lines
8.3 KiB
HTML
<!DOCTYPE html>
|
|
<!--
|
|
| Generated by Apache Maven Doxia at 2016-04-24
|
|
| Rendered using Apache Maven Fluido Skin 1.3.0
|
|
-->
|
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<meta name="author" content="mkurz" />
|
|
<meta name="Date-Creation-yyyymmdd" content="20110815" />
|
|
<meta name="Date-Revision-yyyymmdd" content="20160424" />
|
|
<meta http-equiv="Content-Language" content="en" />
|
|
<title>ROME - Rss and atOM utiliEs (ROME) v0.7 Date and Time Parsing</title>
|
|
<link rel="stylesheet" href="./css/apache-maven-fluido-1.3.0.min.css" />
|
|
<link rel="stylesheet" href="./css/site.css" />
|
|
<link rel="stylesheet" href="./css/print.css" media="print" />
|
|
|
|
|
|
<script type="text/javascript" src="./js/apache-maven-fluido-1.3.0.min.js"></script>
|
|
|
|
|
|
</head>
|
|
<body class="topBarDisabled">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a href="http://github.com/rometools/rome">
|
|
<img style="position: absolute; top: 0; right: 0; border: 0; z-index: 10000;"
|
|
src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png"
|
|
alt="Fork me on GitHub">
|
|
</a>
|
|
|
|
|
|
|
|
|
|
<div class="container-fluid">
|
|
<div id="banner">
|
|
<div class="pull-left">
|
|
<a href="index.html" id="bannerLeft">
|
|
<img src="images/romelogo.png" alt="ROME"/>
|
|
</a>
|
|
</div>
|
|
<div class="pull-right"> </div>
|
|
<div class="clear"><hr/></div>
|
|
</div>
|
|
|
|
<div id="breadcrumbs">
|
|
<ul class="breadcrumb">
|
|
|
|
|
|
|
|
|
|
|
|
<li id="publishDate" class="pull-right">Last Published: 2016-04-24</li> <li class="divider pull-right">|</li>
|
|
<li id="projectVersion" class="pull-right">Version: 1.7.0-SNAPSHOT</li>
|
|
|
|
</ul>
|
|
</div>
|
|
|
|
|
|
<div class="row-fluid">
|
|
<div id="leftColumn" class="span3">
|
|
<div class="well sidebar-nav">
|
|
|
|
|
|
<ul class="nav nav-list">
|
|
<li class="nav-header">Rome</li>
|
|
|
|
<li>
|
|
|
|
<a href="index.html" title="Overview">
|
|
<i class="none"></i>
|
|
Overview</a>
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<a href="HowRomeWorks/index.html" title="How Rome Works">
|
|
<i class="icon-chevron-right"></i>
|
|
How Rome Works</a>
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<a href="RssAndAtOMUtilitiEsROMEV0.5AndAboveTutorialsAndArticles/index.html" title="Tutorials And Articles">
|
|
<i class="none"></i>
|
|
Tutorials And Articles</a>
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<a href="ROMEReleases/index.html" title="Releases">
|
|
<i class="icon-chevron-right"></i>
|
|
Releases</a>
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<a href="ROMEDevelopmentProposals/index.html" title="ROME Development Proposals">
|
|
<i class="none"></i>
|
|
ROME Development Proposals</a>
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<a href="Modules/index.html" title="Modules">
|
|
<i class="icon-chevron-right"></i>
|
|
Modules</a>
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<a href="Fetcher/index.html" title="Fetcher">
|
|
<i class="icon-chevron-right"></i>
|
|
Fetcher</a>
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<a href="Opml/index.html" title="OPML">
|
|
<i class="none"></i>
|
|
OPML</a>
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<a href="Propono/index.html" title="Propono">
|
|
<i class="none"></i>
|
|
Propono</a>
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<a href="Certiorem/index.html" title="Certiorem">
|
|
<i class="icon-chevron-right"></i>
|
|
Certiorem</a>
|
|
</li>
|
|
<li class="nav-header">Project Documentation</li>
|
|
|
|
<li>
|
|
|
|
<a href="project-info.html" title="Project Information">
|
|
<i class="icon-chevron-right"></i>
|
|
Project Information</a>
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
|
|
<hr class="divider" />
|
|
|
|
<div id="poweredBy">
|
|
<div class="clear"></div>
|
|
<div class="clear"></div>
|
|
<div class="clear"></div>
|
|
<a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy">
|
|
<img class="builtBy" alt="Built by Maven" src="./images/logos/maven-feather.png" />
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div id="bodyColumn" class="span9" >
|
|
|
|
<div class="section">
|
|
<h2>Rss and atOM utiliEs (ROME) v0.7 Date and Time Parsing<a name="Rss_and_atOM_utiliEs_ROME_v0.7_Date_and_Time_Parsing"></a></h2>
|
|
<p>Date and time elements seem to be error prone. RSS feeds use RFC822 datetime formats and Atom feeds use W3C datetime formats. Both RFC822 and W3C support quite a few flavors for specifying date and time. Some feeds use the wrong standard (such as some RSS feeds using W3C dates). Other feeds have an ENTER before or after the date. And another feeds use an arbitrary format altogether.</p>
|
|
<p>To help cope with this ROME makes a few tricks:</p>
|
|
<ul>
|
|
<li>It trims datetime elements before parsing them.</li>
|
|
<li>It tries both RFC822 and W3C formats in all feeds.</li>
|
|
<li>It uses custom format masks (if provided) when the previous steps fail.</li></ul>
|
|
<div class="section">
|
|
<h3>Using Custom Format Masks<a name="Using_Custom_Format_Masks"></a></h3>
|
|
<p>Custom format masks can be specified in the <i>/rome.properties</i> file in any of the classpath elements.</p>
|
|
<p>The masks must be specified in the <i>datetime.extra.masks</i> property.</p>
|
|
<p>If more than one mask is to be specified they must be separated with '|' characters.</p>
|
|
<p>The syntax for the masks is the one use by by the <i>java.text.SimpleDateFormat</i> class. Always US Locale is assumed for the masks.</p>
|
|
<p>If datetime masks are specified in more than one <i>/rome.properties</i> file in teh classpath, they are all aggregated.</p></div></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<hr/>
|
|
|
|
<footer>
|
|
<div class="container-fluid">
|
|
<div class="row span12">Copyright © 2016.
|
|
All Rights Reserved.
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
</footer>
|
|
</body>
|
|
</html>
|