Created
March 21, 2017 23:32
-
-
Save jhyland87/3d5902ce93b978d68afd0ccdba8384b4 to your computer and use it in GitHub Desktop.
Convert the stupid "friendly" dates displayed by Atlassian to something useful
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This changes the friendly timestamp display values in Atlassian from values like: Now, Today, Yesterday, n Hours Ago, etc | |
* Then changes the <time> tags to <span> tags (since <time> tags get updated every couple seconds) | |
*/ | |
$( 'time' ).each(function( idx, elm ){ | |
$( elm ) | |
.text( new Date( $( elm ).attr( 'datetime' ) ).toGMTString() ) | |
.replaceWith(function() { | |
return '<span>' + this.innerHTML + '</span>' | |
}) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment