From afb3823b5cd5175271c36fb5c5f3fbeaa64d6498 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sat, 15 Feb 2014 19:35:07 +0100 Subject: get current time MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/__main__.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/__main__.py b/src/__main__.py index 8cf70ae..d6ace7c 100755 --- a/src/__main__.py +++ b/src/__main__.py @@ -15,6 +15,7 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . import os +import datetime from colour import * from curve import * @@ -111,3 +112,7 @@ for file in ('$XDG_CONFIG_HOME/%/%rc', '$HOME/.config/%/%rc', '$HOME/.%rc', '/et exec(code, globals) break +## Get the current time +now = datetime.datetime.now() # .year, .month, .day, .hour, .minute, .second +weekday = now.isocalendar()[2] + -- cgit v1.2.3-70-g09d2