1
0
mirror of https://github.com/Tygs/0bin.git synced 2023-08-10 21:13:00 +03:00

Replace date parsing with a cross browser regex

This commit is contained in:
sam 2012-05-16 19:16:02 +02:00
parent 4baa3757da
commit 0707c77b65

View File

@ -234,7 +234,8 @@ window.zerobin = {
$.each(keys, function(i, key){
var pasteDateTime = key.replace(/^[^#]+#/, '');
var displayDate = zerobin.getFormatedDate(new Date(pasteDateTime));
var displayDate = pasteDateTime.match(/^(\d+)-(\d+)-(\d+)\s/);
displayDate = displayDate[2] + '-' + displayDate[3] + '-' + displayDate[1];
var prefix = 'the ';
if (displayDate === today){
displayDate = pasteDateTime.split(' ')[1];