SO - Time/Date recognition

http://stackoverflow.com/q/8568434/1011582

HTML

<script src="http://momentjs.com/downloads/moment-with-langs.min.js"></script>
<h3>Text:</h3>

<p id="text">
Periode 2012-11-01 2012-12 2013-01 2013-03
</p>

<h3>Found:</h3>

<ul id="result"></ul>

JavaScript

// remove all dots behind letters and split using whitespaces as separator
var words = "Periode 2012-11-01 2012-12 2013-01 2013-03".replace(/([A-Za-z])\.+/g,'$1').split(/\s+/);

_(words)
    .map(function(word) {return moment(word)})
    .filter(function(moment) {return moment.isValid()})
    .map(function(moment) {return moment.toISOString()})
    .each(function(result) {console.log(result)})