PloneBooking Permissions
Version: $Revision: 1.4 $
PloneBooking Tool
Version: $Revision: 1.25 $
Tool for PloneBooking
BookingTool.BookingTool
Methods: (buildFilter, cancelBooking, escapeText, filterBookingBrains, getAllPeriodicBookingBrains, getBookingDefaultTitle, getCalendarViewDisplayList, getCalendarViewVocabulary, getDayGroupKeys, getIntervalOfMinutesGroupKeys, getListingViewDisplayList, getListingViewVocabulary, getMonthGroupKeys, getViewModeDisplayList, getViewModeVocabulary, getWeekGroupKeys, getYearGroupKeys, isBooked)
- method buildFilter (**kwargs) Returns a dictionnary using kwargs.
Removes None values.
BookingTool.BookingTool.buildFilter
- method cancelBooking (booking) Delete the booking
BookingTool.BookingTool.cancelBooking
Functions: (escape)
BookingTool.BookingTool.filterBookingBrains
- method getAllPeriodicBookingBrains (booking_uid) Returns periodic brains for a booking.
BookingTool.BookingTool.getAllPeriodicBookingBrains
BookingTool.BookingTool.getBookingDefaultTitle
- method getCalendarViewDisplayList () Returns listing view display list
BookingTool.BookingTool.getCalendarViewDisplayList
- method getCalendarViewVocabulary () Returns listing view vocabulary
BookingTool.BookingTool.getCalendarViewVocabulary
- method getDayGroupKeys (start_date, end_date)
BookingTool.BookingTool.getDayGroupKeys
- method getListingViewDisplayList () Returns listing view display list
BookingTool.BookingTool.getListingViewDisplayList
- method getListingViewVocabulary () Returns listing view vocabulary
BookingTool.BookingTool.getListingViewVocabulary
- method getMonthGroupKeys (start_date, end_date)
BookingTool.BookingTool.getMonthGroupKeys
- method getViewModeDisplayList () Returns view mode display list
BookingTool.BookingTool.getViewModeDisplayList
- method getViewModeVocabulary () Returns view mode vocabulary
BookingTool.BookingTool.getViewModeVocabulary
- method getWeekGroupKeys (start_date, end_date)
BookingTool.BookingTool.getWeekGroupKeys
- method getYearGroupKeys (start_date, end_date)
BookingTool.BookingTool.getYearGroupKeys
DateManager: Date tools
Version: $Revision: 1.19 $
def buildWeekBookings(self, week, year, bookings): week_bookings = [] days = self.buildWeekDays(week, year) week_bookings.append(days) #[day_ts, day_ts+1, ...]
ts_delta = 3600 start_hour = 8 start_minute = 0 end_hour = 12 end_minute = 0 for day in days: ts_start = self.setTsTime(day, start_hour, start_minute) ts_end = self.setTsTime(day, end_hour, end_minute) hours = self.buildPeriodList(ts_start, ts_end, ts_delta) booking_per_hours = {} # bookings for a given hour for hour in hours: bookings_for_date = []
for booking in bookings: bookings_for_date.append('booked')
booking_per_hours[hour] = bookings_for_date week_bookings.append(booking_per_hours)
return week_bookings
DateManager.DateManager
Methods: (addDays, addMonths, addWeeks, addYears, buildMonthCalendar, buildPeriodList, buildWeekDays, buildWeekTable, deltaMonths, dt2ts, getDateRangeFromDate, getDateRangeFromMonth, getDateRangeFromWeek, getDateRangeFromYear, getDatetimeFromTs, getFirstValidDay, getFormatedDate, getFormatedLongDate, getFormatedMonthDate, getFormatedWeekDate, getFormatedYearDate, getMonthFromDelta, getTimeFromTs, getTodayTs, getTsFromDatetime, getTsFromZDateTime, getWeekFromDelta, getZDateTimeFromts, setTsTime, substractDays, substractMonths, substractWeeks, substractYears, ts2dt, ts2zdt, weekDayNumberOfMonth, zdt2dt, zdt2ts)
- method addDays (ts, days=1) Add a day count to timestamp
DateManager.DateManager.addDays
DateManager.DateManager.addMonths
- method addWeeks (ts, weeks=1) Add a week count to timestamp
DateManager.DateManager.addWeeks
- method addYears (ts, years=1) Add a year count to timestamp
DateManager.DateManager.addYears
DateManager.DateManager.buildMonthCalendar
DateManager.DateManager.buildPeriodList
DateManager.DateManager.buildWeekDays
DateManager.DateManager.buildWeekTable
- method deltaMonths (ts, months=0) Add or remove months from delta
DateManager.DateManager.deltaMonths
- method dt2ts (dt) Convert a datetime to an epoch timestamp
DateManager.DateManager.dt2ts
DateManager.DateManager.getDateRangeFromDate
DateManager.DateManager.getDateRangeFromMonth
DateManager.DateManager.getDateRangeFromWeek
DateManager.DateManager.getDateRangeFromYear
- method getDatetimeFromTs (ts) Return the corresponding datetime from this timestamp
DateManager.DateManager.getDatetimeFromTs
- method getFirstValidDay (line) Return the first non 0 day number of a month_calendar line
DateManager.DateManager.getFirstValidDay
- method getFormatedDate (date, with_year=1) Get translated date
DateManager.DateManager.getFormatedDate
- method getFormatedLongDate (date) Get translated date with hour and minutes.
Use UTC date
DateManager.DateManager.getFormatedLongDate
- method getFormatedMonthDate (month, year) Get translated month date
DateManager.DateManager.getFormatedMonthDate
- method getFormatedWeekDate (week, year) Get translated week date
DateManager.DateManager.getFormatedWeekDate
- method getFormatedYearDate (year) Get translated year date
DateManager.DateManager.getFormatedYearDate
- method getMonthFromDelta (month, year, delta=0) Return tuple month, year
DateManager.DateManager.getMonthFromDelta
- method getTimeFromTs (ts) Return time from given timestamp
DateManager.DateManager.getTimeFromTs
- method getTodayTs () Return today's timestamp
DateManager.DateManager.getTodayTs
- method getTsFromDatetime (dt) Return the timestamp corresponding to the datetime
DateManager.DateManager.getTsFromDatetime
- method getTsFromZDateTime (zdt) Return the timestamp corresponding to the (Zope) DateTime
DateManager.DateManager.getTsFromZDateTime
- method getWeekFromDelta (week, year, delta=0) Return tuple week, year
DateManager.DateManager.getWeekFromDelta
- method getZDateTimeFromts (ts) Return the Zope DateTime corresponding to the epoch timestamp
DateManager.DateManager.getZDateTimeFromts
- method setTsTime (ts, hour=0, minute=0) Set hour and minute for a given datetime
DateManager.DateManager.setTsTime
- method substractDays (ts, days=1) Substract a day count to timestamp
DateManager.DateManager.substractDays
DateManager.DateManager.substractMonths
- method substractWeeks (ts, weeks=1) Substract a week count from timestamp
DateManager.DateManager.substractWeeks
- method substractYears (ts, years=1) Substract a year count from timestamp
DateManager.DateManager.substractYears
- method ts2dt (ts) Convert this epoch timestamp to a datetime
DateManager.DateManager.ts2dt
- method ts2zdt (ts) Convert this epoch timestamp to a Zope DateTime
DateManager.DateManager.ts2zdt
DateManager.DateManager.weekDayNumberOfMonth
- method zdt2dt (zdt) Convert a Zope DateTime to a datetime
DateManager.DateManager.zdt2dt
- method zdt2ts (zdt) Convert a Zope DateTime to an epoch timestamp
DateManager.DateManager.zdt2ts
PloneBooking: Module
Version: $Revision: 1.6 $
PloneBooking Config
Version: $Revision: 1.6 $
Created by Doc-Tool V0.9.1 on Mon Nov 13 17:46:40 2006