lundi 8 juin 2015

Python 3.4 date time code challange

I'm seeking ideas and resources for the following code challange: Create code that will use the current time of the Portland HQ to find out the time in the NYC & London branches, then compare that time with the branches hours to see if they are open or closed. Print out if each of the two branches are open or closed.

I've tried breaking this down to a simple plan but i'm drawing a blank. Here is what i do know:

I'm trying to use arrow, however I'm not set on it as I'm still learning. I'm open to all or any suggestions.

`portland = arrow.now()`
`newyork = arrow.get([2015-06-08,'US/Pacific'])`
`london = arrow.utcnow()`

My next though is to maybe use the variables in a if statement of some sort. not quite sure just really thinking out loud. Anyone please give me a hand. Thanks!

Aucun commentaire:

Enregistrer un commentaire