当前位置: 首页>>代码示例>>Python>>正文


Python render.dateTime函数代码示例

本文整理汇总了Python中taskcoachlib.render.dateTime函数的典型用法代码示例。如果您正苦于以下问题:Python dateTime函数的具体用法?Python dateTime怎么用?Python dateTime使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了dateTime函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: _OnSelectFile

 def _OnSelectFile(self, event):
     self.__backups.DeleteAllItems()
     for index, dateTime in enumerate(self.__manifest.listBackups(self.__filenames[event.GetIndex()])):
         self.__backups.InsertStringItem(index, render.dateTime(dateTime, humanReadable=True))
     self.__backups.SetColumnWidth(0, -1)
     self.__backups.Enable(True)
     self.__selection = (self.__filenames[event.GetIndex()], None)
开发者ID:pk-codebox-evo,项目名称:ios-apps-taskcoach,代码行数:7,代码来源:backupmanager.py

示例2: testCollapsedCompositeTaskShowsRecursivePlannedStartDateTime

 def testCollapsedCompositeTaskShowsRecursivePlannedStartDateTime(self):
     self.taskList.extend([self.task, self.child])
     self.task.addChild(self.child)
     now = date.Now()
     self.child.setPlannedStartDateTime(now)
     self.task.setPlannedStartDateTime(date.DateTime())
     self.viewer.setSortByTaskStatusFirst(False)
     self.viewer.setSortOrderAscending(False)
     expectedDateTime = "(%s)" % render.dateTime(now, humanReadable=True) if self.treeMode else ''
     self.task.expand(False, context=self.viewer.settingsSection())
     self.assertEqual(expectedDateTime, self.getItemText(0, 1))
开发者ID:pk-codebox-evo,项目名称:ios-apps-taskcoach,代码行数:11,代码来源:TaskViewerTest.py

示例3: assertRenderedDateTime

 def assertRenderedDateTime(self, expectedDateTime, *dateTimeArgs):
     renderedDateTime = render.dateTime(date.DateTime(*dateTimeArgs))
     if expectedDateTime:
         renderedParts = renderedDateTime.split(' ', 1)
         if len(renderedParts) > 1:
             renderedDate, renderedTime = renderedParts
             expectedDate, expectedTime = expectedDateTime.split(' ', 1)
             self.assertEqual(expectedTime, renderedTime)
         else:
             expectedDate, renderedDate = expectedDateTime, renderedDateTime
         self.assertEqual(expectedDate, renderedDate)
     else:
         self.assertEqual(expectedDateTime, renderedDateTime)
开发者ID:pk-codebox-evo,项目名称:ios-apps-taskcoach,代码行数:13,代码来源:RenderTest.py

示例4: AddInnerContent

    def AddInnerContent(self, sizer, panel):
        idleTimeFormatted = render.dateTime(self._idleTime)
        sizer.Add(wx.StaticText(panel, wx.ID_ANY,
            _('No user input since %s. The following task was\nbeing tracked:') % \
                                idleTimeFormatted))
        sizer.Add(wx.StaticText(panel, wx.ID_ANY,
            self._effort.task().subject()))

        btnNothing = wx.Button(panel, wx.ID_ANY, _('Do nothing'))
        btnStopAt = wx.Button(panel, wx.ID_ANY, _('Stop it at %s') % idleTimeFormatted)
        btnStopResume = wx.Button(panel, wx.ID_ANY, _('Stop it at %s and resume now') % idleTimeFormatted)

        sizer.Add(btnNothing, 0, wx.EXPAND | wx.ALL, 1)
        sizer.Add(btnStopAt, 0, wx.EXPAND | wx.ALL, 1)
        sizer.Add(btnStopResume, 0, wx.EXPAND | wx.ALL, 1)

        wx.EVT_BUTTON(btnNothing, wx.ID_ANY, self.DoNothing)
        wx.EVT_BUTTON(btnStopAt, wx.ID_ANY, self.DoStopAt)
        wx.EVT_BUTTON(btnStopResume, wx.ID_ANY, self.DoStopResume)
开发者ID:MahadJamal,项目名称:Task-Coach-Evolution,代码行数:19,代码来源:idlecontroller.py

示例5: testCompletionDateTomorrow

 def testCompletionDateTomorrow(self):
     tomorrow = date.Tomorrow().startOfDay()
     self.viewer.showColumnByName('completionDateTime')
     self.task.setCompletionDateTime(tomorrow)
     self.expectInCSV(render.dateTime(tomorrow, humanReadable=False))
开发者ID:HieronymusCH,项目名称:TaskCoach,代码行数:5,代码来源:CSVWriterTest.py

示例6: testCreationDateTime

 def testCreationDateTime(self):
     self.viewer.showColumnByName('creationDateTime')
     self.expectInCSV(
         render.dateTime(self.task.creationDateTime(), humanReadable=False))
开发者ID:HieronymusCH,项目名称:TaskCoach,代码行数:4,代码来源:CSVWriterTest.py

示例7: testCompletionDateTimeToday

 def testCompletionDateTimeToday(self):
     today = date.Now()
     self.viewer.showColumnByName('completionDateTime')
     self.task.setCompletionDateTime(today)
     self.expectInCSV(render.dateTime(today, humanReadable=False))
开发者ID:HieronymusCH,项目名称:TaskCoach,代码行数:5,代码来源:CSVWriterTest.py

示例8: testCompletionDateYesterday

 def testCompletionDateYesterday(self):
     yesterday = date.Yesterday().startOfDay()
     self.viewer.showColumnByName('completionDateTime')
     self.task.setCompletionDateTime(yesterday)
     self.expectInCSV(render.dateTime(yesterday, humanReadable=False))
开发者ID:HieronymusCH,项目名称:TaskCoach,代码行数:5,代码来源:CSVWriterTest.py

示例9: testActualStartDateTimeTomorrow

 def testActualStartDateTimeTomorrow(self):
     tomorrow = date.Tomorrow()
     self.viewer.showColumnByName('actualStartDateTime')
     self.task.setActualStartDateTime(tomorrow)
     self.expectInCSV(render.dateTime(tomorrow, humanReadable=False))
开发者ID:HieronymusCH,项目名称:TaskCoach,代码行数:5,代码来源:CSVWriterTest.py

示例10: testActualStartDateToday

 def testActualStartDateToday(self):
     today = date.Now().startOfDay()
     self.viewer.showColumnByName('actualStartDateTime')
     self.task.setActualStartDateTime(today)
     self.expectInCSV(render.dateTime(today, humanReadable=False))
开发者ID:HieronymusCH,项目名称:TaskCoach,代码行数:5,代码来源:CSVWriterTest.py

示例11: testModificationDateTime

 def testModificationDateTime(self):
     self.task.setModificationDateTime(date.DateTime(2012, 1, 1, 10, 0, 0))
     self.viewer.showColumnByName("modificationDateTime")
     self.expectInHTML(render.dateTime(self.task.modificationDateTime(), humanReadable=False))
开发者ID:HieronymusCH,项目名称:TaskCoach,代码行数:4,代码来源:HTMLWriterTest.py

示例12: testActualStartDateTimeYesterday

 def testActualStartDateTimeYesterday(self):
     yesterday = date.Yesterday()
     self.viewer.showColumnByName('actualStartDateTime')
     self.task.setActualStartDateTime(yesterday)
     self.expectInCSV(render.dateTime(yesterday, humanReadable=False))
开发者ID:HieronymusCH,项目名称:TaskCoach,代码行数:5,代码来源:CSVWriterTest.py

示例13: testModificationDateTime

 def testModificationDateTime(self):
     self.viewer.showColumnByName('modificationDateTime')
     self.task.setModificationDateTime(date.DateTime(2013, 1, 1, 12, 0, 0))
     self.expectInCSV(
         render.dateTime(
             self.task.modificationDateTime(), humanReadable=False))
开发者ID:HieronymusCH,项目名称:TaskCoach,代码行数:6,代码来源:CSVWriterTest.py

示例14: testDateBefore1900

 def testDateBefore1900(self):
     # Don't check for '1801' since the year may be formatted on only 2
     # digits.
     result = render.dateTime(date.DateTime(1801, 4, 5, 23, 0, 0))
     self.failUnless('01' in result, result)
开发者ID:pk-codebox-evo,项目名称:ios-apps-taskcoach,代码行数:5,代码来源:RenderTest.py

示例15: renderCreationDateTime

 def renderCreationDateTime(item, humanReadable=True):
     return render.dateTime(item.creationDateTime(), 
                            humanReadable=humanReadable)
开发者ID:MahadJamal,项目名称:Task-Coach-Evolution,代码行数:3,代码来源:base.py


注:本文中的taskcoachlib.render.dateTime函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。