Skip to content

Commit

Permalink
Some fun, countdown for 10 days
Browse files Browse the repository at this point in the history
  • Loading branch information
Seb35 committed Jan 1, 2019
1 parent 82c095c commit 7220b44
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions js/durafront.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ $( function() {

$('#article-pjl-ppl').val('Au sixième alinéa de l’article 16 de la Constitution, les mots : « soixante députés ou soixante sénateurs » sont remplacés par les mots : « quarante députés ou quarante sénateurs ».');

console.log(new Date().getMonth());
console.log(new Date().getDate());
var date = new Date();
if( date.getMonth() == 0 && date.getDate() < 10 ) {
$('#amendement').val('I. - Au premier alinéa, remplacer le mot « ' + (date.getFullYear()-1) + ' » par « ' + date.getFullYear() + ' ».\n\nII. - ' + $('#amendement').val().replace('premier', 'troisième'));
$('#article-pjl-ppl').val('Bonne année ' + (date.getFullYear()-1) + ' !\n\n-- Sinon voici l’exemple réel ci-dessous ------\n\n' + $('#article-pjl-ppl').val());
}

$('#amendement, #article-pjl-ppl').keyup( function(e) {

if( e.originalEvent.keyCode !== 13 || e.originalEvent.ctrlKey !== true ) {
Expand Down
2 changes: 1 addition & 1 deletion server.py
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ def printTree(self, tree):
httpd = http.server.HTTPServer(('127.0.0.1', 8081), DuraLexSedLexHTTPRequestHandler)
sa = httpd.socket.getsockname()
t = time.time()
print(time.strftime('[%d/%b/%Y %H:%M:%S')+('%.5f]'%(t-int(t)))[1:], "***", "Serving HTTP on", sa[0], "port", sa[1], "...")
print("***", time.strftime('[%d/%b/%Y %H:%M:%S')+('%.5f]'%(t-int(t)))[1:], "***", "Serving HTTP on", sa[0], "port", sa[1], "...")
try:
httpd.serve_forever()
except KeyboardInterrupt:
Expand Down

0 comments on commit 7220b44

Please sign in to comment.