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

All Samples(1090)  |  Call(1090)  |  Derive(0)  |  Import(0)
Format the date/time using the *current timezone representation*.

src/f/t/ftw.workspace-2.1.0/ftw/workspace/browser/overview.py   ftw.workspace(Download)
            if modified.day() == today:
                return _(u'label_today', default=u'Today, ${time}',
                         mapping={'time': modified.strftime('%H:%M')})
 
            elif modified.day() == yesterday:
                return _(u'label_yesterday', u'Yesterday, ${time}',
                         mapping={'time': modified.strftime('%H:%M')})
            else:
                return modified.strftime('%d.%m.%Y')
                return modified.strftime('%d.%m.%Y')
        else:
            return modified.strftime('%d.%m.%Y')
 
    def translate_readable_date(self, value):

src/p/r/Products.CMFPlone-5.0a2/Products/CMFPlone/i18nl10n.py   Products.CMFPlone(Download)
    formatstring = get_formatstring_from_registry(msgid)
    if not formatstring is None:
        return time.strftime(formatstring)
 
    # 2. the normal case: translation machinery,
        else:
            formatstring = '[INTERNAL ERROR]'
        return time.strftime(formatstring)
 
    # get the format elements used in the formatstring
 
    for key in elements:
        mapping[key] = time.strftime('%' + key)
 
    if week_included:
        weekday = int(time.strftime('%w'))  # weekday, sunday = 0
            mapping['A'] = weekdayname_msgid(weekday)
    if month_included:
        monthday = int(time.strftime('%m'))  # month, january = 1
        if 'b' in name_elements:
            mapping['b'] = monthname_msgid_abbr(monthday)

src/p/r/Products.CMFPlone-HEAD/Products/CMFPlone/i18nl10n.py   Products.CMFPlone(Download)
    formatstring = get_formatstring_from_registry(msgid)
    if not formatstring is None:
        return time.strftime(formatstring)
 
    # 2. the normal case: translation machinery,
        else:
            formatstring = '[INTERNAL ERROR]'
        return time.strftime(formatstring)
 
    # get the format elements used in the formatstring
 
    for key in elements:
        mapping[key] = time.strftime('%' + key)
 
    if week_included:
        weekday = int(time.strftime('%w'))  # weekday, sunday = 0
            mapping['A'] = weekdayname_msgid(weekday)
    if month_included:
        monthday = int(time.strftime('%m'))  # month, january = 1
        if 'b' in name_elements:
            mapping['b'] = monthname_msgid_abbr(monthday)

src/v/n/vnccollab.theme-1.7.11-/vnccollab/theme/browser/viewlets.py   vnccollab.theme(Download)
        date = DateTime()
        self.day = date.day()
        self.month = _pl(monthname_msgid(int(date.strftime('%m'))),
            default=safe_unicode(date.Month()))
        self.dayname = _pl(weekdayname_msgid(int(date.strftime('%w'))),

src/i/s/IssueTrackerProduct-0.14.2/IssueTrackerProduct/IssueTracker.py   IssueTrackerProduct(Download)
 
            # prepare to save some nanoseconds
            today_Ymd = today.strftime('%Y%m%d')
            today_YW = today.strftime('%Y%W')
 
        yesterday = today - 1
        last_week = DateTime()-7
        yyyy = int(today.strftime('%Y'))
        mm = int(today.strftime('%m'))
        last_month = mm -1
 
 
        today_date = today.strftime('%Y%m%d')
        yesterday_date = today.strftime('%Y%m%d')
        this_week_date = today.strftime('%U%Y')

src/b/i/bika.lims-3.01a/bika/lims/content/analysisrequest.py   bika.lims(Download)
        # check for an adhoc invoice batch for this month
        now = DateTime()
        batch_month = now.strftime('%b %Y')
        batch_title = '%s - %s' % (batch_month, 'ad hoc')
        invoice_batch = None

src/i/s/IssueTrackerProduct-HEAD/IssueTrackerProduct/IssueTracker.py   IssueTrackerProduct(Download)
 
            # prepare to save some nanoseconds
            today_Ymd = today.strftime('%Y%m%d')
            today_YW = today.strftime('%Y%W')
 
        yesterday = today - 1
        last_week = DateTime()-7
        yyyy = int(today.strftime('%Y'))
        mm = int(today.strftime('%m'))
        last_month = mm -1
 
 
        today_date = today.strftime('%Y%m%d')
        yesterday_date = today.strftime('%Y%m%d')
        this_week_date = today.strftime('%U%Y')

src/b/i/Bika-LIMS-HEAD/bika/lims/content/analysisrequest.py   Bika-LIMS(Download)
        # check for an adhoc invoice batch for this month
        now = DateTime()
        batch_month = now.strftime('%b %Y')
        batch_title = '%s - %s' % (batch_month, 'ad hoc')
        invoice_batch = None

src/f/t/ftw.blog-1.6.1/ftw/blog/browser/blog.py   ftw.blog(Download)
            month = translate(month_msgid, domain='plonelocales',
                              context=self.request)
            self.filters.append("%s %s" % (month, start.strftime('%Y')))
        if self.request.form.get('getCategoryUids'):
            uid = self.request.form.get('getCategoryUids')

src/p/r/Products.PloneBooking-3.0.0a2/Products/PloneBooking/content/Booking.py   Products.PloneBooking(Download)
        minutes = date_value.minute()
        minutes = int(minutes / 5) * 5
        date_string = date_value.strftime('%Y/%m/%d %H')
        date_string += ':%s' % minutes
        return DateTime(date_string)
        minutes = date_value.minute()
        minutes = int(minutes / 5) * 5
        date_string = date_value.strftime('%Y/%m/%d %H')
        date_string += ':%s' % minutes
        return DateTime(date_string)

  1 | 2 | 3 | 4 | 5 | 6  Next