I'm using the dateutil module from http://labix.org/python-dateutil.
Am I right in thinking that the rrules module doesn't acknowledge days
before today?
An example of the issue: rule_temp = rrule(YEARLY,bymonth=1,bymonthday=1) print rule_temp.between(datetime(2006,12,1),datetime(200 7,1,4),True)
[datetime.datetime(2007, 1, 1, 19, 21, 29)] print rule_temp.between(datetime(2005,12,1),datetime(200 6,1,4),True)
[] print rule_temp.between(datetime(2005,12,1),datetime(200 7,1,4),True)
[datetime.datetime(2007, 1, 1, 19, 21, 29)] print rule_temp.before(datetime.today(),True)
None print rule_temp.after(datetime.today(),True)
2007-01-01 19:21:29
Basically, it doesn't seem to acknowledge any dates before today. Is
this right?
Cheers
Matt 1 1467
I'll answer my own post.
If you don't specify dtstart, it defaults to datetime.today().
Therefore, there are no instances before today. Specify dtstart as a
historic date, and it works on any dates after dtstart.
Wish I'd engaged brain before posting.
Matt This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Smoke |
last post by:
I have a successful script for determining today's date.
Does anyone have anything for determining tomorrow and the next day since it
would have to look at the day of month and month of year?
...
|
by: Irfan |
last post by:
Hi All,
I am trying to create a report but having problem with the critiera
selection logic, please help.
I have the following fields
date1
date2
date3
|
by: Rachel Suddeth |
last post by:
Is there a way to have the non-selectable dates (those before MinDate and
after MaxDate) draw differently so my users can see right away what dates
aren't allowed? I'm not seeing it...
...
|
by: Duppypog |
last post by:
I'm trying to compare a date stored in a database with today's date using an
If statement, but it's not returning true. Example, value in database is
11/5/2003 with today being 11/6/2003. Can...
|
by: Elainie |
last post by:
I need to get the dates between now and next week but using Now and
Next week not any
specific dates...
Please help, going mad...
Elaine
|
by: M Skabialka |
last post by:
I am creating my first Visual Studio project, an inventory database. I have
created a form and used written directions to add data from a table to the
form using table adapters, data sets, etc.
...
|
by: David |
last post by:
Hi,
I need to display 3 fields with future dates (Fridays only) as table
column headers.
i.e. 16th Feb | 23rd Feb | 2nd March.
As each week passes, i.e. from the Saturday, the dates should...
|
by: jholg |
last post by:
Hi all,
I'm having some problems with python-datetutil (which is a very, very nice tool, btw). Anybody knows where to adress these other than here? I tried reaching the author but don't seem to...
|
by: soni2926 |
last post by:
Hi,
I have a web application, asp.net and c# done in 2.0, which is going
to return rows from the db with dates or certain events. The db is
going to have events dates for the entire year, but on...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
| |