Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(66)  |  Call(66)  |  Derive(0)  |  Import(0)
Return the calendar year of the object.

src/e/r/erp5-HEAD/product/ERP5/mixin/periodicity.py   erp5(Download)
      else:
        new_date = DateTime(new_date.timeTime() + 3600.0)
    return DateTime(new_date.year(), new_date.month(), new_date.day(),
            0, 0, 0, timezone)
 
    else:
      new_date = DateTime(date.timeTime() + 3600.0)
    return DateTime(new_date.year(), new_date.month(), new_date.day(),
            new_date.hour(), 0, 0, timezone)
 
    else:
      new_date = DateTime(date.timeTime() + 60.0)
    return DateTime(new_date.year(), new_date.month(), new_date.day(),
            new_date.hour(), new_date.minute(), 0, timezone)
 

src/p/l/plonetheme.arnolfini-0.96/plonetheme/arnolfini/browser/views.py   plonetheme.arnolfini(Download)
            if event.end() is not None:
                end = DateTime(event.end())
                return end.year() < t.year() or (end.year() == t.year() and end.month() < t.month()) or(end.year() == t.year() and end.month() == t.month() and end.day() < t.day())
            else:
                start = DateTime(event.start())

src/e/r/erp5-HEAD/product/Formulator/Widget.py   erp5(Download)
    timezone = None
    if isinstance(value, DateTime):
      year = "%04d" % value.year()
      month = "%02d" % value.month()
      day = "%02d" % value.day()

src/p/r/Products.Formulator-1.15.5/Products/Formulator/Widget.py   Products.Formulator(Download)
            if not isinstance(value, DateTime):
                value = DateTime(value)
            year = "%04d" % value.year()
            month = "%02d" % value.month()
            day = "%02d" % value.day()
            if not isinstance(value, DateTime):
                value = DateTime(value)
            sub_values['year']  = '%04d' % value.year()
            sub_values['month'] = "%02d" % value.month()
            sub_values['day']   = "%02d" % value.day()
        if not isinstance(value, DateTime):
            value = DateTime(value)
        year = "%04d" % value.year()
        month = "%02d" % value.month()
        day = "%02d" % value.day()

src/p/r/Products.BastionLedger-4.6.0/Products/BastionLedger/utils.py   Products.BastionLedger(Download)
    if not isinstance(dt, DateTime):
        dt = DateTime(dt)
    return DateTime('%i/%s/01 %s' % (dt.year(), dt.mm(), dt.timezone()))
 
def month_ending_date(dt):
    # find the first of the next month (thats easy) then deduct a day ...
    if dt.month() == 12:
        return DateTime('%i/01/01 %s' % ((dt.year() + 1), dt.timezone())) - 1
    return DateTime('%i/%0.2i/01 %s' % (dt.year(), dt.month() + 1, dt.timezone())) - 1
 

src/p/l/plone.app.event-1.2.4/plone/app/event/at/content.py   plone.app.event(Download)
        value = DateTime(
            '%04d-%02d-%02dT%02d:%02d:%02d' % (
                value.year(),
                value.month(),
                value.day(),

src/p/r/Products.PloneBooking-3.0.0a2/Products/PloneBooking/DateManager.py   Products.PloneBooking(Download)
 
        # Finished at 23:59:59
        end_date = DateTime(end_date.year(),
                      end_date.month(),
                      end_date.day(),
 
        # Finished at 23:59:59
        end_date = DateTime(end_date.year(),
                      end_date.month(),
                      end_date.day(),
            end_date = start_date
 
        start_date = DateTime(start_date.year(),
                      start_date.month(),
                      start_date.day(),
                      0, 0, 0)
 
        # Finished at 23:59:59
        end_date = DateTime(end_date.year(),

src/p/r/Products.plonehrm-2.14/Products/plonehrm/validator.py   Products.plonehrm(Download)
    def __call__(self, value, *args, **kwargs):
        now = DateTime()
        value = DateTime(value)
        if value > now:
            if value.year() > now.year():
            return translate(error, context=kwargs['REQUEST'])
 
        if value.year() > now.year()-12:
            error = _("You are too young")
            return translate(error, context=kwargs['REQUEST'])

src/f/t/ftw.workspace-2.1.0/ftw/workspace/browser/overview.py   ftw.workspace(Download)
 
        modified = DateTime(datetimestring)
        if modified.month() == this_month and modified.year() == this_year:
            if modified.day() == today:
                return _(u'label_today', default=u'Today, ${time}',

src/c/o/collective.chimpfeed-2.0/src/collective/chimpfeed/campaign.py   collective.chimpfeed(Download)
    def results(self, start, until=None):
        today = DateTime()
        today = DateTime(today.year(), today.month(), today.day())
        start = DateTime(start)
        start = DateTime(start.year(), start.month(), start.day())

  1 | 2 | 3 | 4  Next