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:
parent
4baa3757da
commit
0707c77b65
@ -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];
|
||||
|
Loading…
Reference in New Issue
Block a user