├── LICENSE ├── README.md ├── index.html └── main.js /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Hugonun(https://github.com/hugonun) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # discordid2date 2 | Turns a Discord ID (channel, server, user or message) into the creation date. 3 | 4 | https://hugonun.github.io/discordid2date/ 5 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Discord ID to Creation Date 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |

Discord ID to Creation Date

17 |

See the creation date of a server, channel, message or user using their Discord ID!

18 |

Place the ID in the Discord ID field. Example: 459891664182312982

19 | Discord ID:
20 |
21 |
22 |
23 |

Result:

24 | Creation Date(24H format):
25 | Creation Date(12H format):
26 | Your timezone:
27 | Time ago:
28 | Unix timestamp:
29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /main.js: -------------------------------------------------------------------------------- 1 | // MIT License 2 | // 3 | // Copyright (c) 2019 Hugonun(https://github.com/hugonun) 4 | 5 | function convertIDtoUnix(id) { 6 | /* Note: id has to be str */ 7 | var bin = (+id).toString(2); 8 | var unixbin = ''; 9 | var unix = ''; 10 | var m = 64 - bin.length; 11 | unixbin = bin.substring(0, 42-m); 12 | unix = parseInt(unixbin, 2) + 1420070400000; 13 | return unix; 14 | } 15 | 16 | function convert(id) { 17 | var unix = convertIDtoUnix(id.toString()); 18 | var timestamp = moment.unix(unix/1000); 19 | document.getElementById('i-date24').innerHTML = timestamp.format('YYYY-MM-DD, HH:mm:ss'); 20 | document.getElementById('i-date12').innerHTML = timestamp.format('YYYY-MM-DD, h:mm:ss A'); 21 | document.getElementById('i-timezone').innerHTML = moment.tz.guess(); 22 | document.getElementById('i-timeago').innerHTML = timestamp.fromNow(); 23 | document.getElementById('i-timestamp').innerHTML = unix; 24 | } 25 | --------------------------------------------------------------------------------