taskjuggler 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README +1 -1
- data/bin/tj3client +3 -0
- data/bin/tj3d +3 -0
- data/bin/tj3ts_receiver +3 -0
- data/bin/tj3ts_sender +3 -0
- data/bin/tj3ts_summary +3 -0
- data/data/css/tjmanual.css +14 -0
- data/data/css/tjreport.css +233 -21
- data/data/scripts/wz_tooltip.js +20 -20
- data/doc/AppConfig.html +1389 -0
- data/doc/Arguments.html +678 -0
- data/doc/COPYING.html +837 -0
- data/doc/Object.html +996 -0
- data/doc/README.html +523 -0
- data/doc/RuntimeConfig.html +762 -0
- data/doc/String.html +872 -0
- data/doc/TaskJuggler/Account.html +691 -0
- data/doc/TaskJuggler/AccountAttribute.html +707 -0
- data/doc/TaskJuggler/AccountScenario.html +650 -0
- data/doc/TaskJuggler/Allocation.html +898 -0
- data/doc/TaskJuggler/AllocationAttribute.html +737 -0
- data/doc/TaskJuggler/AttributeBase.html +1193 -0
- data/doc/TaskJuggler/AttributeDefinition.html +753 -0
- data/doc/TaskJuggler/BatchProcessor.html +1112 -0
- data/doc/TaskJuggler/Booking.html +797 -0
- data/doc/TaskJuggler/BookingListAttribute.html +709 -0
- data/doc/TaskJuggler/BooleanAttribute.html +707 -0
- data/doc/TaskJuggler/CSVFile.html +924 -0
- data/doc/TaskJuggler/CellSettingPattern.html +638 -0
- data/doc/TaskJuggler/CellSettingPatternList.html +687 -0
- data/doc/TaskJuggler/Charge.html +715 -0
- data/doc/TaskJuggler/ChargeListAttribute.html +671 -0
- data/doc/TaskJuggler/ChargeSet.html +887 -0
- data/doc/TaskJuggler/ChargeSetListAttribute.html +718 -0
- data/doc/TaskJuggler/ColumnListAttribute.html +673 -0
- data/doc/TaskJuggler/ColumnTable.html +701 -0
- data/doc/TaskJuggler/Daemon.html +728 -0
- data/doc/TaskJuggler/DateAttribute.html +675 -0
- data/doc/TaskJuggler/DefinitionListAttribute.html +593 -0
- data/doc/TaskJuggler/DependencyListAttribute.html +713 -0
- data/doc/TaskJuggler/DurationAttribute.html +707 -0
- data/doc/TaskJuggler/FixnumAttribute.html +629 -0
- data/doc/TaskJuggler/FlagListAttribute.html +709 -0
- data/doc/TaskJuggler/FloatAttribute.html +671 -0
- data/doc/TaskJuggler/FormatListAttribute.html +635 -0
- data/doc/TaskJuggler/GanttChart.html +1473 -0
- data/doc/TaskJuggler/GanttContainer.html +885 -0
- data/doc/TaskJuggler/GanttHeader.html +886 -0
- data/doc/TaskJuggler/GanttHeaderScaleItem.html +700 -0
- data/doc/TaskJuggler/GanttLine.html +1263 -0
- data/doc/TaskJuggler/GanttLoadStack.html +766 -0
- data/doc/TaskJuggler/GanttMilestone.html +865 -0
- data/doc/TaskJuggler/GanttRouter.html +1433 -0
- data/doc/TaskJuggler/GanttTaskBar.html +880 -0
- data/doc/TaskJuggler/HTMLDocument.html +719 -0
- data/doc/TaskJuggler/HTMLGraphics.html +775 -0
- data/doc/TaskJuggler/Interval.html +1016 -0
- data/doc/TaskJuggler/IntervalListAttribute.html +713 -0
- data/doc/TaskJuggler/JobInfo.html +881 -0
- data/doc/TaskJuggler/Journal.html +991 -0
- data/doc/TaskJuggler/JournalEntry.html +779 -0
- data/doc/TaskJuggler/JournalEntryList.html +952 -0
- data/doc/TaskJuggler/KeywordArray.html +628 -0
- data/doc/TaskJuggler/KeywordDocumentation.html +1662 -0
- data/doc/TaskJuggler/Limits/Limit.html +826 -0
- data/doc/TaskJuggler/Limits.html +966 -0
- data/doc/TaskJuggler/LimitsAttribute.html +707 -0
- data/doc/TaskJuggler/ListAttributeBase.html +641 -0
- data/doc/TaskJuggler/Log.html +1103 -0
- data/doc/TaskJuggler/LogFile.html +918 -0
- data/doc/TaskJuggler/LogicalAttribute.html +698 -0
- data/doc/TaskJuggler/LogicalExpression.html +739 -0
- data/doc/TaskJuggler/LogicalExpressionAttribute.html +629 -0
- data/doc/TaskJuggler/LogicalFlag.html +681 -0
- data/doc/TaskJuggler/LogicalFunction.html +1218 -0
- data/doc/TaskJuggler/LogicalOperation.html +1078 -0
- data/doc/TaskJuggler/Macro.html +646 -0
- data/doc/TaskJuggler/MacroParser.html +810 -0
- data/doc/TaskJuggler/MacroTable.html +810 -0
- data/doc/TaskJuggler/ManagerResponsibilities.html +674 -0
- data/doc/TaskJuggler/ManagerStatusRecord.html +678 -0
- data/doc/TaskJuggler/Message.html +757 -0
- data/doc/TaskJuggler/MessageHandler.html +679 -0
- data/doc/TaskJuggler/Navigator.html +867 -0
- data/doc/TaskJuggler/NavigatorElement.html +932 -0
- data/doc/TaskJuggler/NikuProject.html +662 -0
- data/doc/TaskJuggler/NikuReport.html +1316 -0
- data/doc/TaskJuggler/NikuResource.html +632 -0
- data/doc/TaskJuggler/OnShiftCache.html +864 -0
- data/doc/TaskJuggler/ProcessIntercom.html +847 -0
- data/doc/TaskJuggler/ProcessIntercomIface.html +664 -0
- data/doc/TaskJuggler/Project.html +3056 -0
- data/doc/TaskJuggler/ProjectBroker.html +1260 -0
- data/doc/TaskJuggler/ProjectBrokerIface.html +734 -0
- data/doc/TaskJuggler/ProjectFileParser.html +1951 -0
- data/doc/TaskJuggler/ProjectRecord.html +859 -0
- data/doc/TaskJuggler/ProjectServer.html +1092 -0
- data/doc/TaskJuggler/ProjectServerIface.html +768 -0
- data/doc/TaskJuggler/PropertyAttribute.html +629 -0
- data/doc/TaskJuggler/PropertyList.html +1336 -0
- data/doc/TaskJuggler/PropertySet.html +1785 -0
- data/doc/TaskJuggler/PropertyTreeNode.html +2482 -0
- data/doc/TaskJuggler/Query.html +1831 -0
- data/doc/TaskJuggler/RTFNavigator.html +729 -0
- data/doc/TaskJuggler/RTFQuery.html +1038 -0
- data/doc/TaskJuggler/RTFReport.html +740 -0
- data/doc/TaskJuggler/RealFormat.html +743 -0
- data/doc/TaskJuggler/RealFormatAttribute.html +593 -0
- data/doc/TaskJuggler/ReferenceAttribute.html +782 -0
- data/doc/TaskJuggler/Report.html +1255 -0
- data/doc/TaskJuggler/ReportBase.html +1198 -0
- data/doc/TaskJuggler/ReportContext.html +711 -0
- data/doc/TaskJuggler/ReportServer.html +988 -0
- data/doc/TaskJuggler/ReportServerIface.html +838 -0
- data/doc/TaskJuggler/ReportServerRecord.html +716 -0
- data/doc/TaskJuggler/ReportTable.html +1106 -0
- data/doc/TaskJuggler/ReportTableCell.html +1536 -0
- data/doc/TaskJuggler/ReportTableColumn.html +828 -0
- data/doc/TaskJuggler/ReportTableLegend.html +999 -0
- data/doc/TaskJuggler/ReportTableLine.html +1003 -0
- data/doc/TaskJuggler/Resource.html +938 -0
- data/doc/TaskJuggler/ResourceListAttribute.html +752 -0
- data/doc/TaskJuggler/ResourceListRE.html +674 -0
- data/doc/TaskJuggler/ResourceScenario.html +2457 -0
- data/doc/TaskJuggler/RichText.html +791 -0
- data/doc/TaskJuggler/RichTextAttribute.html +743 -0
- data/doc/TaskJuggler/RichTextDocument.html +972 -0
- data/doc/TaskJuggler/RichTextElement.html +1615 -0
- data/doc/TaskJuggler/RichTextException.html +667 -0
- data/doc/TaskJuggler/RichTextFunctionExample.html +737 -0
- data/doc/TaskJuggler/RichTextFunctionHandler.html +689 -0
- data/doc/TaskJuggler/RichTextImage.html +650 -0
- data/doc/TaskJuggler/RichTextIntermediate.html +1161 -0
- data/doc/TaskJuggler/RichTextParser.html +756 -0
- data/doc/TaskJuggler/RichTextScanner.html +2010 -0
- data/doc/TaskJuggler/RichTextSnip.html +942 -0
- data/doc/TaskJuggler/RichTextSyntaxRules.html +1722 -0
- data/doc/TaskJuggler/Scenario.html +594 -0
- data/doc/TaskJuggler/ScenarioData.html +815 -0
- data/doc/TaskJuggler/ScenarioListAttribute.html +671 -0
- data/doc/TaskJuggler/Scoreboard.html +1114 -0
- data/doc/TaskJuggler/SheetHandlerBase.html +1115 -0
- data/doc/TaskJuggler/SheetReceiver.html +1293 -0
- data/doc/TaskJuggler/SheetSender.html +1089 -0
- data/doc/TaskJuggler/Shift.html +689 -0
- data/doc/TaskJuggler/ShiftAssignment.html +950 -0
- data/doc/TaskJuggler/ShiftAssignments.html +1379 -0
- data/doc/TaskJuggler/ShiftAssignmentsAttribute.html +707 -0
- data/doc/TaskJuggler/ShiftScenario.html +720 -0
- data/doc/TaskJuggler/SortListAttribute.html +631 -0
- data/doc/TaskJuggler/SourceFileInfo.html +698 -0
- data/doc/TaskJuggler/StatusSheetReceiver.html +615 -0
- data/doc/TaskJuggler/StatusSheetReport.html +872 -0
- data/doc/TaskJuggler/StatusSheetSender.html +654 -0
- data/doc/TaskJuggler/StringAttribute.html +671 -0
- data/doc/TaskJuggler/SymbolAttribute.html +629 -0
- data/doc/TaskJuggler/SyntaxReference.html +1155 -0
- data/doc/TaskJuggler/TOCEntry.html +723 -0
- data/doc/TaskJuggler/TSResourceRecord.html +670 -0
- data/doc/TaskJuggler/TSTaskRecord.html +682 -0
- data/doc/TaskJuggler/TableColumnDefinition.html +830 -0
- data/doc/TaskJuggler/TableOfContents.html +692 -0
- data/doc/TaskJuggler/TableReport.html +2444 -0
- data/doc/TaskJuggler/Task.html +781 -0
- data/doc/TaskJuggler/TaskDependency.html +730 -0
- data/doc/TaskJuggler/TaskListAttribute.html +713 -0
- data/doc/TaskJuggler/TaskListRE.html +673 -0
- data/doc/TaskJuggler/TaskScenario.html +4380 -0
- data/doc/TaskJuggler/TextFormatter.html +911 -0
- data/doc/TaskJuggler/TextParser/Pattern.html +1482 -0
- data/doc/TaskJuggler/TextParser/Rule.html +1288 -0
- data/doc/TaskJuggler/TextParser/StackElement.html +726 -0
- data/doc/TaskJuggler/TextParser/TextParserResultArray.html +648 -0
- data/doc/TaskJuggler/TextParser/TokenDoc.html +680 -0
- data/doc/TaskJuggler/TextParser.html +1670 -0
- data/doc/TaskJuggler/TextReport.html +856 -0
- data/doc/TaskJuggler/TextScanner/BufferStreamHandle.html +831 -0
- data/doc/TaskJuggler/TextScanner/FileStreamHandle.html +832 -0
- data/doc/TaskJuggler/TextScanner/StreamHandle.html +737 -0
- data/doc/TaskJuggler/TextScanner.html +2430 -0
- data/doc/TaskJuggler/TimeSheet.html +1233 -0
- data/doc/TaskJuggler/TimeSheetReceiver.html +612 -0
- data/doc/TaskJuggler/TimeSheetRecord.html +1352 -0
- data/doc/TaskJuggler/TimeSheetReport.html +948 -0
- data/doc/TaskJuggler/TimeSheetSender.html +637 -0
- data/doc/TaskJuggler/TimeSheetSummary.html +865 -0
- data/doc/TaskJuggler/TimeSheets.html +674 -0
- data/doc/TaskJuggler/Tj3AppBase.html +782 -0
- data/doc/TaskJuggler/Tj3Client.html +1455 -0
- data/doc/TaskJuggler/Tj3Daemon.html +767 -0
- data/doc/TaskJuggler/Tj3SheetAppBase.html +696 -0
- data/doc/TaskJuggler/Tj3SsReceiver.html +682 -0
- data/doc/TaskJuggler/Tj3SsSender.html +708 -0
- data/doc/TaskJuggler/Tj3TsReceiver.html +681 -0
- data/doc/TaskJuggler/Tj3TsSender.html +702 -0
- data/doc/TaskJuggler/Tj3TsSummary.html +710 -0
- data/doc/TaskJuggler/TjException.html +630 -0
- data/doc/TaskJuggler/TjTime.html +2590 -0
- data/doc/TaskJuggler/TjpExample.html +835 -0
- data/doc/TaskJuggler/TjpExportRE.html +1581 -0
- data/doc/TaskJuggler/TjpSyntaxRules.html +13004 -0
- data/doc/TaskJuggler/UserManual.html +1145 -0
- data/doc/TaskJuggler/WorkingHours.html +1101 -0
- data/doc/TaskJuggler/WorkingHoursAttribute.html +694 -0
- data/doc/TaskJuggler/XMLBlob.html +645 -0
- data/doc/TaskJuggler/XMLComment.html +640 -0
- data/doc/TaskJuggler/XMLDocument.html +732 -0
- data/doc/TaskJuggler/XMLElement.html +900 -0
- data/doc/TaskJuggler/XMLNamedText.html +601 -0
- data/doc/TaskJuggler/XMLText.html +655 -0
- data/doc/TaskJuggler.html +2243 -0
- data/doc/index.html +3778 -17
- data/doc/lib/AccountScenario_rb.html +67 -0
- data/doc/lib/Account_rb.html +69 -0
- data/doc/lib/Allocation_rb.html +69 -0
- data/doc/lib/AppConfig_rb.html +69 -0
- data/doc/lib/AttributeBase_rb.html +67 -0
- data/doc/lib/AttributeDefinition_rb.html +65 -0
- data/doc/lib/Attributes_rb.html +81 -0
- data/doc/lib/BatchProcessor_rb.html +69 -0
- data/doc/lib/Booking_rb.html +65 -0
- data/doc/lib/ChargeSet_rb.html +67 -0
- data/doc/lib/Charge_rb.html +67 -0
- data/doc/lib/HTMLDocument_rb.html +67 -0
- data/doc/lib/Interval_rb.html +67 -0
- data/doc/lib/Journal_rb.html +65 -0
- data/doc/lib/KeywordArray_rb.html +65 -0
- data/doc/lib/KeywordDocumentation_rb.html +75 -0
- data/doc/lib/Limits_rb.html +67 -0
- data/doc/lib/LogFile_rb.html +67 -0
- data/doc/lib/Log_rb.html +69 -0
- data/doc/lib/LogicalExpression_rb.html +71 -0
- data/doc/lib/LogicalFunction_rb.html +67 -0
- data/doc/lib/LogicalOperation_rb.html +67 -0
- data/doc/lib/MacroParser_rb.html +69 -0
- data/doc/lib/MacroTable_rb.html +73 -0
- data/doc/lib/MessageHandler_rb.html +65 -0
- data/doc/lib/Message_rb.html +67 -0
- data/doc/lib/ProjectFileParser_rb.html +79 -0
- data/doc/lib/Project_rb.html +109 -0
- data/doc/lib/PropertyList_rb.html +65 -0
- data/doc/lib/PropertySet_rb.html +69 -0
- data/doc/lib/PropertyTreeNode_rb.html +65 -0
- data/doc/lib/Query_rb.html +67 -0
- data/doc/lib/RTFNavigator_rb.html +71 -0
- data/doc/lib/RTFQuery_rb.html +71 -0
- data/doc/lib/RTFReport_rb.html +69 -0
- data/doc/lib/RealFormat_rb.html +65 -0
- data/doc/lib/ResourceScenario_rb.html +67 -0
- data/doc/lib/Resource_rb.html +69 -0
- data/doc/lib/RichTextDocument_rb.html +71 -0
- data/doc/lib/RichTextElement_rb.html +73 -0
- data/doc/lib/RichTextFunctionExample_rb.html +71 -0
- data/doc/lib/RichTextFunctionHandler_rb.html +65 -0
- data/doc/lib/RichTextParser_rb.html +71 -0
- data/doc/lib/RichTextScanner_rb.html +67 -0
- data/doc/lib/RichTextSnip_rb.html +69 -0
- data/doc/lib/RichTextSyntaxRules_rb.html +65 -0
- data/doc/lib/RichText_rb.html +69 -0
- data/doc/lib/RuntimeConfig_rb.html +67 -0
- data/doc/lib/ScenarioData_rb.html +69 -0
- data/doc/lib/Scenario_rb.html +67 -0
- data/doc/lib/Scoreboard_rb.html +65 -0
- data/doc/lib/SheetHandlerBase_rb.html +69 -0
- data/doc/lib/SheetReceiver_rb.html +75 -0
- data/doc/lib/SheetSender_rb.html +73 -0
- data/doc/lib/ShiftAssignments_rb.html +67 -0
- data/doc/lib/ShiftScenario_rb.html +67 -0
- data/doc/lib/Shift_rb.html +69 -0
- data/doc/lib/SourceFileInfo_rb.html +65 -0
- data/doc/lib/StatusSheetReceiver_rb.html +67 -0
- data/doc/lib/StatusSheetSender_rb.html +67 -0
- data/doc/lib/SyntaxReference_rb.html +73 -0
- data/doc/lib/TOCEntry_rb.html +69 -0
- data/doc/lib/TableColumnDefinition_rb.html +65 -0
- data/doc/lib/TableOfContents_rb.html +69 -0
- data/doc/lib/TaskDependency_rb.html +65 -0
- data/doc/lib/TaskJuggler_rb.html +73 -0
- data/doc/lib/TaskScenario_rb.html +67 -0
- data/doc/lib/Task_rb.html +69 -0
- data/doc/lib/TextFormatter_rb.html +67 -0
- data/doc/lib/TextParser/Pattern_rb.html +67 -0
- data/doc/lib/TextParser/Rule_rb.html +65 -0
- data/doc/lib/TextParser/StackElement_rb.html +65 -0
- data/doc/lib/TextParser/TokenDoc_rb.html +65 -0
- data/doc/lib/TextParser_rb.html +75 -0
- data/doc/lib/TextScanner_rb.html +79 -0
- data/doc/lib/TimeSheetReceiver_rb.html +67 -0
- data/doc/lib/TimeSheetSender_rb.html +67 -0
- data/doc/lib/TimeSheetSummary_rb.html +67 -0
- data/doc/lib/TimeSheets_rb.html +65 -0
- data/doc/lib/Tj3AppBase_rb.html +77 -0
- data/doc/lib/Tj3Config_rb.html +69 -0
- data/doc/lib/Tj3SheetAppBase_rb.html +67 -0
- data/doc/lib/TjException_rb.html +65 -0
- data/doc/lib/TjTime_rb.html +69 -0
- data/doc/lib/TjpExample_rb.html +67 -0
- data/doc/lib/TjpSyntaxRules_rb.html +65 -0
- data/doc/lib/UTF8String_rb.html +65 -0
- data/doc/lib/UserManual_rb.html +77 -0
- data/doc/lib/WorkingHours_rb.html +67 -0
- data/doc/lib/XMLDocument_rb.html +67 -0
- data/doc/lib/XMLElement_rb.html +67 -0
- data/doc/lib/daemon/Daemon_rb.html +67 -0
- data/doc/lib/daemon/ProcessIntercom_rb.html +67 -0
- data/doc/lib/daemon/ProjectBroker_rb.html +79 -0
- data/doc/lib/daemon/ProjectServer_rb.html +83 -0
- data/doc/lib/daemon/ReportServer_rb.html +73 -0
- data/doc/lib/deep_copy_rb.html +65 -0
- data/doc/lib/reports/CSVFile_rb.html +67 -0
- data/doc/lib/reports/ColumnTable_rb.html +67 -0
- data/doc/lib/reports/GanttChart_rb.html +73 -0
- data/doc/lib/reports/GanttContainer_rb.html +67 -0
- data/doc/lib/reports/GanttHeaderScaleItem_rb.html +65 -0
- data/doc/lib/reports/GanttHeader_rb.html +67 -0
- data/doc/lib/reports/GanttLine_rb.html +77 -0
- data/doc/lib/reports/GanttLoadStack_rb.html +67 -0
- data/doc/lib/reports/GanttMilestone_rb.html +67 -0
- data/doc/lib/reports/GanttRouter_rb.html +65 -0
- data/doc/lib/reports/GanttTaskBar_rb.html +67 -0
- data/doc/lib/reports/HTMLGraphics_rb.html +65 -0
- data/doc/lib/reports/Navigator_rb.html +67 -0
- data/doc/lib/reports/NikuReport_rb.html +69 -0
- data/doc/lib/reports/ReportBase_rb.html +65 -0
- data/doc/lib/reports/ReportContext_rb.html +65 -0
- data/doc/lib/reports/ReportTableCell_rb.html +65 -0
- data/doc/lib/reports/ReportTableColumn_rb.html +65 -0
- data/doc/lib/reports/ReportTableLegend_rb.html +65 -0
- data/doc/lib/reports/ReportTableLine_rb.html +67 -0
- data/doc/lib/reports/ReportTable_rb.html +69 -0
- data/doc/lib/reports/Report_rb.html +91 -0
- data/doc/lib/reports/ResourceListRE_rb.html +73 -0
- data/doc/lib/reports/StatusSheetReport_rb.html +67 -0
- data/doc/lib/reports/TableReport_rb.html +75 -0
- data/doc/lib/reports/TaskListRE_rb.html +73 -0
- data/doc/lib/reports/TextReport_rb.html +67 -0
- data/doc/lib/reports/TimeSheetReport_rb.html +67 -0
- data/doc/lib/reports/TjpExportRE_rb.html +67 -0
- data/doc/lib/ruby-signal-bug_rb.html +54 -0
- data/doc/lib/taskjuggler3_rb.html +73 -0
- data/doc/lib/tj3client_rb.html +73 -0
- data/doc/lib/tj3d_rb.html +73 -0
- data/doc/lib/tj3man_rb.html +73 -0
- data/doc/lib/tj3ss_receiver_rb.html +69 -0
- data/doc/lib/tj3ss_sender_rb.html +69 -0
- data/doc/lib/tj3ts_receiver_rb.html +69 -0
- data/doc/lib/tj3ts_sender_rb.html +69 -0
- data/doc/lib/tj3ts_summary_rb.html +69 -0
- data/doc/rdoc.css +701 -0
- data/examples/tutorial.tjp +25 -6
- data/lib/Attributes.rb +6 -2
- data/lib/HTMLDocument.rb +18 -2
- data/lib/Journal.rb +47 -4
- data/lib/KeywordArray.rb +1 -1
- data/lib/KeywordDocumentation.rb +17 -77
- data/lib/Log.rb +3 -1
- data/lib/LogFile.rb +72 -0
- data/lib/LogicalExpression.rb +5 -10
- data/lib/LogicalFunction.rb +34 -18
- data/lib/LogicalOperation.rb +32 -18
- data/lib/Project.rb +85 -13
- data/lib/ProjectFileParser.rb +19 -6
- data/lib/PropertyList.rb +12 -2
- data/lib/PropertyTreeNode.rb +23 -9
- data/lib/Query.rb +51 -13
- data/lib/RTFReport.rb +2 -2
- data/lib/Resource.rb +157 -0
- data/lib/ResourceScenario.rb +215 -68
- data/lib/RichText.rb +15 -3
- data/lib/RichTextDocument.rb +2 -4
- data/lib/RichTextElement.rb +87 -25
- data/lib/RichTextScanner.rb +32 -5
- data/lib/RichTextSnip.rb +6 -4
- data/lib/RichTextSyntaxRules.rb +44 -8
- data/lib/RuntimeConfig.rb +93 -0
- data/lib/Scoreboard.rb +6 -6
- data/lib/SheetHandlerBase.rb +215 -0
- data/lib/SheetReceiver.rb +355 -0
- data/lib/SheetSender.rb +264 -0
- data/lib/ShiftAssignments.rb +35 -27
- data/lib/StatusSheetReceiver.rb +45 -0
- data/lib/StatusSheetSender.rb +54 -0
- data/lib/SyntaxReference.rb +2 -7
- data/lib/Task.rb +70 -0
- data/lib/TaskJuggler.rb +114 -12
- data/lib/TaskScenario.rb +131 -22
- data/lib/TextFormatter.rb +177 -0
- data/lib/TextParser.rb +10 -1
- data/lib/TextScanner.rb +63 -33
- data/lib/TimeSheetReceiver.rb +42 -0
- data/lib/TimeSheetSender.rb +55 -0
- data/lib/TimeSheetSummary.rb +149 -0
- data/lib/TimeSheets.rb +406 -0
- data/lib/Tj3AppBase.rb +114 -0
- data/lib/Tj3Config.rb +1 -1
- data/lib/Tj3SheetAppBase.rb +59 -0
- data/lib/TjTime.rb +14 -1
- data/lib/TjpSyntaxRules.rb +573 -211
- data/lib/UTF8String.rb +4 -0
- data/lib/UserManual.rb +8 -7
- data/lib/XMLElement.rb +27 -19
- data/lib/daemon/Daemon.rb +70 -0
- data/lib/daemon/ProcessIntercom.rb +117 -0
- data/lib/daemon/ProjectBroker.rb +450 -0
- data/lib/daemon/ProjectServer.rb +348 -0
- data/lib/daemon/ReportServer.rb +194 -0
- data/lib/reports/ColumnTable.rb +2 -0
- data/lib/reports/GanttChart.rb +5 -7
- data/lib/reports/GanttContainer.rb +5 -8
- data/lib/reports/GanttHeader.rb +1 -1
- data/lib/reports/GanttLine.rb +89 -53
- data/lib/reports/GanttMilestone.rb +7 -4
- data/lib/reports/GanttTaskBar.rb +7 -3
- data/lib/reports/HTMLGraphics.rb +24 -9
- data/lib/reports/NikuReport.rb +414 -0
- data/lib/reports/Report.rb +54 -20
- data/lib/reports/ReportBase.rb +21 -0
- data/lib/reports/ReportTable.rb +29 -11
- data/lib/reports/ReportTableCell.rb +154 -86
- data/lib/reports/ReportTableLegend.rb +77 -80
- data/lib/reports/ResourceListRE.rb +2 -3
- data/lib/reports/StatusSheetReport.rb +231 -0
- data/lib/reports/TableReport.rb +74 -65
- data/lib/reports/TaskListRE.rb +2 -4
- data/lib/reports/TextReport.rb +18 -12
- data/lib/reports/TimeSheetReport.rb +145 -80
- data/lib/reports/TjpExportRE.rb +4 -4
- data/lib/ruby-signal-bug.rb +43 -0
- data/lib/taskjuggler3.rb +27 -10
- data/lib/tj3client.rb +411 -77
- data/lib/tj3d.rb +110 -0
- data/lib/tj3ss_receiver.rb +56 -0
- data/lib/tj3ss_sender.rb +84 -0
- data/lib/tj3ts_receiver.rb +59 -0
- data/lib/tj3ts_sender.rb +78 -0
- data/lib/tj3ts_summary.rb +87 -0
- data/manual/Day_To_Day_Juggling +761 -32
- data/manual/Getting_Started +12 -12
- data/manual/Rich_Text_Attributes +13 -1
- data/manual/TaskJuggler_2x_Migration +41 -3
- data/manual/TaskJuggler_Internals +87 -0
- data/manual/The_TaskJuggler_Syntax +1 -2
- data/manual/Tutorial +10 -10
- data/test/TestSuite/CSV-Reports/celltext.tjp +1 -1
- data/test/TestSuite/HTML-Reports/TimeSheet.html +79 -0
- data/test/TestSuite/HTML-Reports/icons/trend-down.png +0 -0
- data/test/TestSuite/HTML-Reports/icons/trend-flat.png +0 -0
- data/test/TestSuite/HTML-Reports/icons/trend-up.png +0 -0
- data/test/TestSuite/HTML-Reports/reference.html +51 -0
- data/test/TestSuite/Scheduler/Correct/Booking2.html +603 -0
- data/test/TestSuite/Scheduler/Correct/Booking2.tjp +57 -0
- data/test/TestSuite/Scheduler/Correct/Duration.tjp +32 -18
- data/test/TestSuite/Scheduler/Correct/Manager.tjp +9 -0
- data/test/TestSuite/Scheduler/Correct/Shift.html +429 -0
- data/test/TestSuite/Scheduler/Correct/Shift2.html +162 -0
- data/test/TestSuite/Scheduler/Correct/Shift2.tjp +67 -0
- data/test/TestSuite/{Syntax/Correct/TimeSheet.tjp → Scheduler/Correct/TimeSheet2.tjp} +21 -8
- data/test/TestSuite/Scheduler/Correct/css/tjmanual.css +52 -0
- data/test/TestSuite/Scheduler/Correct/css/tjreport.css +195 -0
- data/test/TestSuite/{Syntax → Scheduler}/Correct/icons/details.png +0 -0
- data/test/TestSuite/Scheduler/Correct/icons/flag-green.png +0 -0
- data/test/TestSuite/Scheduler/Correct/icons/flag-red.png +0 -0
- data/test/TestSuite/Scheduler/Correct/icons/flag-yellow.png +0 -0
- data/test/TestSuite/{Syntax → Scheduler}/Correct/icons/resource.png +0 -0
- data/test/TestSuite/{Syntax → Scheduler}/Correct/icons/resourcegroup.png +0 -0
- data/test/TestSuite/{Syntax → Scheduler}/Correct/icons/task.png +0 -0
- data/test/TestSuite/{Syntax → Scheduler}/Correct/icons/taskgroup.png +0 -0
- data/test/TestSuite/Scheduler/Correct/icons/trend-down.png +0 -0
- data/test/TestSuite/Scheduler/Correct/icons/trend-flat.png +0 -0
- data/test/TestSuite/Scheduler/Correct/icons/trend-up.png +0 -0
- data/test/TestSuite/{HTML-Reports/scripts → Scheduler/Correct}/scripts/wz_tooltip.js +0 -0
- data/test/TestSuite/Scheduler/Errors/manager_is_group.tjp +15 -0
- data/test/TestSuite/Scheduler/Errors/manager_is_self.tjp +11 -0
- data/test/TestSuite/Scheduler/Errors/resource_fail_check.tjp +12 -0
- data/test/TestSuite/Scheduler/Errors/resource_warn_check.tjp +12 -0
- data/test/TestSuite/Scheduler/Errors/task_fail_check.tjp +8 -0
- data/test/TestSuite/Scheduler/Errors/task_warn_check.tjp +8 -0
- data/test/TestSuite/Scheduler/Errors/ts_alert1_more_details.tjp +20 -0
- data/test/TestSuite/Scheduler/Errors/ts_alert2_more_details.tjp +21 -0
- data/test/TestSuite/Scheduler/Errors/ts_no_expected_end.tjp +26 -0
- data/test/TestSuite/Scheduler/Errors/ts_no_headline1.tjp +27 -0
- data/test/TestSuite/Scheduler/Errors/ts_no_rem_or_end.tjp +26 -0
- data/test/TestSuite/Scheduler/Errors/ts_no_remaining.tjp +26 -0
- data/test/TestSuite/Scheduler/Errors/ts_no_status_work.tjp +18 -0
- data/test/TestSuite/Scheduler/Errors/ts_no_work.tjp +26 -0
- data/test/TestSuite/Scheduler/Errors/ts_res_new_task.tjp +20 -0
- data/test/TestSuite/Scheduler/Errors/ts_work_too_high.tjp +27 -0
- data/test/TestSuite/Scheduler/Errors/ts_work_too_low.tjp +27 -0
- data/test/TestSuite/StatusSheets/boss.tji +45 -0
- data/test/TestSuite/StatusSheets/boss_mail +51 -0
- data/test/TestSuite/StatusSheets/dev2_mail +37 -0
- data/test/TestSuite/StatusSheets/project.tjp +275 -0
- data/test/TestSuite/StatusSheets/run +50 -0
- data/test/TestSuite/Syntax/Correct/Include.tjp +4 -0
- data/test/TestSuite/Syntax/Correct/Limits-1.tjp +10 -1
- data/test/TestSuite/Syntax/Correct/Manager.tjp +30 -0
- data/test/TestSuite/Syntax/Correct/Niku.tjp +66 -0
- data/test/TestSuite/Syntax/Correct/TimeSheet1.tjp +83 -0
- data/test/TestSuite/Syntax/Correct/include/dir1/file2.tji +1 -0
- data/test/TestSuite/Syntax/Correct/include/dir2/file3.tji +2 -0
- data/test/TestSuite/Syntax/Correct/include/file1.tji +3 -0
- data/test/TestSuite/Syntax/Correct/tutorial.tjp +29 -8
- data/test/TestSuite/Syntax/Errors/ts_bad_priority.tjp +19 -0
- data/test/TestSuite/Syntax/Errors/ts_default_details.tjp +22 -0
- data/test/TestSuite/Syntax/Errors/ts_default_summary.tjp +22 -0
- data/test/TestSuite/Syntax/Errors/ts_duplicate_task.tjp +23 -0
- data/test/TestSuite/Syntax/Errors/ts_end_too_early.tjp +18 -0
- data/test/TestSuite/Syntax/Errors/ts_headline_too_long.tjp +19 -0
- data/test/TestSuite/Syntax/Errors/ts_no_headline2.tjp +27 -0
- data/test/TestSuite/Syntax/Errors/ts_summary_too_long.tjp +29 -0
- data/test/TestSuite/TimeSheets/TimeSheetTemplates/2002-03-01/boss_2002-03-01.tji +36 -0
- data/test/TestSuite/TimeSheets/TimeSheetTemplates/2002-03-01/dev1_2002-03-01.tji +48 -0
- data/test/TestSuite/TimeSheets/TimeSheetTemplates/2002-03-01/dev2_2002-03-01.tji +67 -0
- data/test/TestSuite/TimeSheets/TimeSheetTemplates/2002-03-01/dev3_2002-03-01.tji +67 -0
- data/test/TestSuite/TimeSheets/TimeSheetTemplates/2002-03-01/doc_2002-03-01.tji +48 -0
- data/test/TestSuite/TimeSheets/TimeSheetTemplates/2002-03-01/resources.yml +31 -0
- data/test/TestSuite/TimeSheets/TimeSheetTemplates/2002-03-01/test_2002-03-01.tji +36 -0
- data/test/TestSuite/TimeSheets/TimeSheetTemplates/acceptable_intervals +1 -0
- data/test/TestSuite/TimeSheets/TimeSheets/2002-03-01/all.tji +1 -0
- data/test/TestSuite/TimeSheets/TimeSheets/2002-03-01/dev2_2002-03-01.tji +54 -0
- data/test/TestSuite/TimeSheets/TimeSheets/all.tji +2 -0
- data/test/TestSuite/TimeSheets/dev2_mail1 +84 -0
- data/test/TestSuite/TimeSheets/dev2_mail2 +87 -0
- data/test/TestSuite/TimeSheets/project.tjp +271 -0
- data/test/TestSuite/TimeSheets/receiver.log +102 -0
- data/test/TestSuite/TimeSheets/run +75 -0
- data/test/TestSuite/TimeSheets/sender.log +794 -0
- data/test/TestSuite/TimeSheets/summary.log +884 -0
- data/test/TestSuite/TimeSheets/timesheets.log +45 -0
- data/test/TestSuite/TimeSheets/tj3d.log +292 -0
- data/test/test_CSV-Reports.rb +5 -3
- data/test/test_RichText.rb +264 -56
- data/test/test_Scheduler.rb +1 -0
- data/test/test_TextFormatter.rb +142 -0
- data/test/test_TjTime.rb +15 -0
- metadata +816 -644
- data/benchmarks/UTF-8-Strings.rb +0 -58
- data/doc/classes/AppConfig.html +0 -880
- data/doc/classes/Arguments.html +0 -230
- data/doc/classes/Object.html +0 -229
- data/doc/classes/String.html +0 -399
- data/doc/classes/TaskJuggler/Account.html +0 -257
- data/doc/classes/TaskJuggler/AccountAttribute.html +0 -261
- data/doc/classes/TaskJuggler/AccountScenario.html +0 -218
- data/doc/classes/TaskJuggler/Allocation.html +0 -423
- data/doc/classes/TaskJuggler/AllocationAttribute.html +0 -291
- data/doc/classes/TaskJuggler/AttributeBase.html +0 -704
- data/doc/classes/TaskJuggler/AttributeDefinition.html +0 -276
- data/doc/classes/TaskJuggler/BatchProcessor.html +0 -347
- data/doc/classes/TaskJuggler/Booking.html +0 -311
- data/doc/classes/TaskJuggler/BookingListAttribute.html +0 -263
- data/doc/classes/TaskJuggler/BooleanAttribute.html +0 -261
- data/doc/classes/TaskJuggler/CSVFile.html +0 -329
- data/doc/classes/TaskJuggler/CellSettingPattern.html +0 -201
- data/doc/classes/TaskJuggler/CellSettingPatternList.html +0 -253
- data/doc/classes/TaskJuggler/Charge.html +0 -283
- data/doc/classes/TaskJuggler/ChargeListAttribute.html +0 -229
- data/doc/classes/TaskJuggler/ChargeSet.html +0 -444
- data/doc/classes/TaskJuggler/ChargeSetListAttribute.html +0 -276
- data/doc/classes/TaskJuggler/ColumnListAttribute.html +0 -231
- data/doc/classes/TaskJuggler/ColumnTable.html +0 -262
- data/doc/classes/TaskJuggler/DateAttribute.html +0 -233
- data/doc/classes/TaskJuggler/DefinitionListAttribute.html +0 -162
- data/doc/classes/TaskJuggler/DependencyListAttribute.html +0 -267
- data/doc/classes/TaskJuggler/DurationAttribute.html +0 -229
- data/doc/classes/TaskJuggler/FixnumAttribute.html +0 -194
- data/doc/classes/TaskJuggler/FlagListAttribute.html +0 -263
- data/doc/classes/TaskJuggler/FloatAttribute.html +0 -229
- data/doc/classes/TaskJuggler/FormatListAttribute.html +0 -197
- data/doc/classes/TaskJuggler/GanttChart.html +0 -696
- data/doc/classes/TaskJuggler/GanttContainer.html +0 -445
- data/doc/classes/TaskJuggler/GanttHeader.html +0 -284
- data/doc/classes/TaskJuggler/GanttHeaderScaleItem.html +0 -249
- data/doc/classes/TaskJuggler/GanttLine.html +0 -402
- data/doc/classes/TaskJuggler/GanttLoadStack.html +0 -331
- data/doc/classes/TaskJuggler/GanttMilestone.html +0 -419
- data/doc/classes/TaskJuggler/GanttRouter.html +0 -431
- data/doc/classes/TaskJuggler/GanttTaskBar.html +0 -433
- data/doc/classes/TaskJuggler/HTMLDocument.html +0 -240
- data/doc/classes/TaskJuggler/HTMLGraphics.html +0 -231
- data/doc/classes/TaskJuggler/Interval.html +0 -558
- data/doc/classes/TaskJuggler/IntervalListAttribute.html +0 -267
- data/doc/classes/TaskJuggler/JobInfo.html +0 -340
- data/doc/classes/TaskJuggler/Journal.html +0 -443
- data/doc/classes/TaskJuggler/JournalEntry.html +0 -274
- data/doc/classes/TaskJuggler/JournalEntryList.html +0 -454
- data/doc/classes/TaskJuggler/KeywordArray.html +0 -179
- data/doc/classes/TaskJuggler/KeywordDocumentation.html +0 -846
- data/doc/classes/TaskJuggler/Limits/Limit.html +0 -385
- data/doc/classes/TaskJuggler/Limits.html +0 -422
- data/doc/classes/TaskJuggler/LimitsAttribute.html +0 -261
- data/doc/classes/TaskJuggler/ListAttributeBase.html +0 -207
- data/doc/classes/TaskJuggler/Log.html +0 -655
- data/doc/classes/TaskJuggler/LogicalAttribute.html +0 -259
- data/doc/classes/TaskJuggler/LogicalExpression.html +0 -292
- data/doc/classes/TaskJuggler/LogicalExpressionAttribute.html +0 -194
- data/doc/classes/TaskJuggler/LogicalFlag.html +0 -209
- data/doc/classes/TaskJuggler/LogicalFunction.html +0 -339
- data/doc/classes/TaskJuggler/LogicalOperation.html +0 -351
- data/doc/classes/TaskJuggler/Macro.html +0 -198
- data/doc/classes/TaskJuggler/MacroParser.html +0 -360
- data/doc/classes/TaskJuggler/MacroTable.html +0 -370
- data/doc/classes/TaskJuggler/Message.html +0 -285
- data/doc/classes/TaskJuggler/MessageHandler.html +0 -231
- data/doc/classes/TaskJuggler/Navigator.html +0 -313
- data/doc/classes/TaskJuggler/NavigatorElement.html +0 -449
- data/doc/classes/TaskJuggler/OnShiftCache.html +0 -316
- data/doc/classes/TaskJuggler/Project.html +0 -2257
- data/doc/classes/TaskJuggler/ProjectFileParser.html +0 -420
- data/doc/classes/TaskJuggler/PropertyAttribute.html +0 -194
- data/doc/classes/TaskJuggler/PropertyList.html +0 -668
- data/doc/classes/TaskJuggler/PropertySet.html +0 -1286
- data/doc/classes/TaskJuggler/PropertyTreeNode.html +0 -1742
- data/doc/classes/TaskJuggler/Query.html +0 -870
- data/doc/classes/TaskJuggler/RTFNavigator.html +0 -293
- data/doc/classes/TaskJuggler/RTFQuery.html +0 -343
- data/doc/classes/TaskJuggler/RTFReport.html +0 -304
- data/doc/classes/TaskJuggler/RealFormat.html +0 -309
- data/doc/classes/TaskJuggler/RealFormatAttribute.html +0 -162
- data/doc/classes/TaskJuggler/ReferenceAttribute.html +0 -328
- data/doc/classes/TaskJuggler/RemoteServiceManager.html +0 -335
- data/doc/classes/TaskJuggler/Report.html +0 -321
- data/doc/classes/TaskJuggler/ReportBase.html +0 -437
- data/doc/classes/TaskJuggler/ReportContext.html +0 -248
- data/doc/classes/TaskJuggler/ReportServer.html +0 -320
- data/doc/classes/TaskJuggler/ReportTable.html +0 -526
- data/doc/classes/TaskJuggler/ReportTableCell.html +0 -614
- data/doc/classes/TaskJuggler/ReportTableColumn.html +0 -368
- data/doc/classes/TaskJuggler/ReportTableLegend.html +0 -347
- data/doc/classes/TaskJuggler/ReportTableLine.html +0 -481
- data/doc/classes/TaskJuggler/Resource.html +0 -211
- data/doc/classes/TaskJuggler/ResourceListAttribute.html +0 -302
- data/doc/classes/TaskJuggler/ResourceListRE.html +0 -245
- data/doc/classes/TaskJuggler/ResourceScenario.html +0 -1229
- data/doc/classes/TaskJuggler/RichText.html +0 -357
- data/doc/classes/TaskJuggler/RichTextAttribute.html +0 -293
- data/doc/classes/TaskJuggler/RichTextDocument.html +0 -424
- data/doc/classes/TaskJuggler/RichTextElement.html +0 -932
- data/doc/classes/TaskJuggler/RichTextException.html +0 -212
- data/doc/classes/TaskJuggler/RichTextFunctionExample.html +0 -301
- data/doc/classes/TaskJuggler/RichTextFunctionHandler.html +0 -245
- data/doc/classes/TaskJuggler/RichTextIntermediate.html +0 -563
- data/doc/classes/TaskJuggler/RichTextParser.html +0 -321
- data/doc/classes/TaskJuggler/RichTextScanner.html +0 -424
- data/doc/classes/TaskJuggler/RichTextSnip.html +0 -404
- data/doc/classes/TaskJuggler/RichTextSyntaxRules.html +0 -1105
- data/doc/classes/TaskJuggler/Scenario.html +0 -163
- data/doc/classes/TaskJuggler/ScenarioData.html +0 -358
- data/doc/classes/TaskJuggler/ScenarioListAttribute.html +0 -229
- data/doc/classes/TaskJuggler/Scoreboard.html +0 -642
- data/doc/classes/TaskJuggler/Shift.html +0 -255
- data/doc/classes/TaskJuggler/ShiftAssignment.html +0 -492
- data/doc/classes/TaskJuggler/ShiftAssignments.html +0 -719
- data/doc/classes/TaskJuggler/ShiftAssignmentsAttribute.html +0 -261
- data/doc/classes/TaskJuggler/ShiftScenario.html +0 -282
- data/doc/classes/TaskJuggler/SortListAttribute.html +0 -196
- data/doc/classes/TaskJuggler/SourceFileInfo.html +0 -251
- data/doc/classes/TaskJuggler/StringAttribute.html +0 -229
- data/doc/classes/TaskJuggler/SymbolAttribute.html +0 -194
- data/doc/classes/TaskJuggler/SyntaxReference.html +0 -520
- data/doc/classes/TaskJuggler/TOCEntry.html +0 -246
- data/doc/classes/TaskJuggler/TSResourceRecord.html +0 -197
- data/doc/classes/TaskJuggler/TSTaskRecord.html +0 -215
- data/doc/classes/TaskJuggler/TableColumnDefinition.html +0 -309
- data/doc/classes/TaskJuggler/TableOfContents.html +0 -260
- data/doc/classes/TaskJuggler/TableReport.html +0 -1015
- data/doc/classes/TaskJuggler/Task.html +0 -203
- data/doc/classes/TaskJuggler/TaskDependency.html +0 -255
- data/doc/classes/TaskJuggler/TaskListAttribute.html +0 -267
- data/doc/classes/TaskJuggler/TaskListRE.html +0 -245
- data/doc/classes/TaskJuggler/TaskScenario.html +0 -2543
- data/doc/classes/TaskJuggler/TextParser/Pattern.html +0 -927
- data/doc/classes/TaskJuggler/TextParser/Rule.html +0 -783
- data/doc/classes/TaskJuggler/TextParser/StackElement.html +0 -272
- data/doc/classes/TaskJuggler/TextParser/TextParserResultArray.html +0 -212
- data/doc/classes/TaskJuggler/TextParser/TokenDoc.html +0 -225
- data/doc/classes/TaskJuggler/TextParser.html +0 -754
- data/doc/classes/TaskJuggler/TextReport.html +0 -367
- data/doc/classes/TaskJuggler/TextScanner/BufferStreamHandle.html +0 -355
- data/doc/classes/TaskJuggler/TextScanner/FileStreamHandle.html +0 -348
- data/doc/classes/TaskJuggler/TextScanner/StreamHandle.html +0 -264
- data/doc/classes/TaskJuggler/TextScanner.html +0 -815
- data/doc/classes/TaskJuggler/TimeSheetReport.html +0 -406
- data/doc/classes/TaskJuggler/TjException.html +0 -185
- data/doc/classes/TaskJuggler/TjTime.html +0 -1904
- data/doc/classes/TaskJuggler/TjpExample.html +0 -314
- data/doc/classes/TaskJuggler/TjpExportRE.html +0 -306
- data/doc/classes/TaskJuggler/TjpSyntaxRules.html +0 -10812
- data/doc/classes/TaskJuggler/UserManual.html +0 -605
- data/doc/classes/TaskJuggler/WorkingHours.html +0 -586
- data/doc/classes/TaskJuggler/WorkingHoursAttribute.html +0 -252
- data/doc/classes/TaskJuggler/XMLBlob.html +0 -207
- data/doc/classes/TaskJuggler/XMLComment.html +0 -206
- data/doc/classes/TaskJuggler/XMLDocument.html +0 -298
- data/doc/classes/TaskJuggler/XMLElement.html +0 -389
- data/doc/classes/TaskJuggler/XMLNamedText.html +0 -174
- data/doc/classes/TaskJuggler/XMLText.html +0 -221
- data/doc/classes/TaskJuggler.html +0 -1573
- data/doc/files/COPYING.html +0 -448
- data/doc/files/README.html +0 -134
- data/doc/files/lib/AccountScenario_rb.html +0 -117
- data/doc/files/lib/Account_rb.html +0 -119
- data/doc/files/lib/Allocation_rb.html +0 -119
- data/doc/files/lib/AppConfig_rb.html +0 -119
- data/doc/files/lib/AttributeBase_rb.html +0 -117
- data/doc/files/lib/AttributeDefinition_rb.html +0 -107
- data/doc/files/lib/Attributes_rb.html +0 -131
- data/doc/files/lib/BatchProcessor_rb.html +0 -119
- data/doc/files/lib/Booking_rb.html +0 -107
- data/doc/files/lib/ChargeSet_rb.html +0 -117
- data/doc/files/lib/Charge_rb.html +0 -117
- data/doc/files/lib/HTMLDocument_rb.html +0 -117
- data/doc/files/lib/Interval_rb.html +0 -117
- data/doc/files/lib/Journal_rb.html +0 -107
- data/doc/files/lib/KeywordArray_rb.html +0 -107
- data/doc/files/lib/KeywordDocumentation_rb.html +0 -123
- data/doc/files/lib/Limits_rb.html +0 -117
- data/doc/files/lib/Log_rb.html +0 -117
- data/doc/files/lib/LogicalExpression_rb.html +0 -121
- data/doc/files/lib/LogicalFunction_rb.html +0 -117
- data/doc/files/lib/LogicalOperation_rb.html +0 -117
- data/doc/files/lib/MacroParser_rb.html +0 -119
- data/doc/files/lib/MacroTable_rb.html +0 -123
- data/doc/files/lib/MessageHandler_rb.html +0 -107
- data/doc/files/lib/Message_rb.html +0 -117
- data/doc/files/lib/ProjectFileParser_rb.html +0 -129
- data/doc/files/lib/Project_rb.html +0 -153
- data/doc/files/lib/PropertyList_rb.html +0 -107
- data/doc/files/lib/PropertySet_rb.html +0 -119
- data/doc/files/lib/PropertyTreeNode_rb.html +0 -107
- data/doc/files/lib/Query_rb.html +0 -117
- data/doc/files/lib/RTFNavigator_rb.html +0 -121
- data/doc/files/lib/RTFQuery_rb.html +0 -121
- data/doc/files/lib/RTFReport_rb.html +0 -119
- data/doc/files/lib/RealFormat_rb.html +0 -107
- data/doc/files/lib/RemoteServiceManager_rb.html +0 -117
- data/doc/files/lib/ReportServer_rb.html +0 -107
- data/doc/files/lib/ResourceScenario_rb.html +0 -117
- data/doc/files/lib/Resource_rb.html +0 -119
- data/doc/files/lib/RichTextDocument_rb.html +0 -121
- data/doc/files/lib/RichTextElement_rb.html +0 -121
- data/doc/files/lib/RichTextFunctionExample_rb.html +0 -121
- data/doc/files/lib/RichTextFunctionHandler_rb.html +0 -107
- data/doc/files/lib/RichTextParser_rb.html +0 -121
- data/doc/files/lib/RichTextScanner_rb.html +0 -117
- data/doc/files/lib/RichTextSnip_rb.html +0 -119
- data/doc/files/lib/RichTextSyntaxRules_rb.html +0 -107
- data/doc/files/lib/RichText_rb.html +0 -119
- data/doc/files/lib/ScenarioData_rb.html +0 -119
- data/doc/files/lib/Scenario_rb.html +0 -117
- data/doc/files/lib/Scoreboard_rb.html +0 -107
- data/doc/files/lib/ShiftAssignments_rb.html +0 -117
- data/doc/files/lib/ShiftScenario_rb.html +0 -117
- data/doc/files/lib/Shift_rb.html +0 -119
- data/doc/files/lib/SourceFileInfo_rb.html +0 -107
- data/doc/files/lib/SyntaxReference_rb.html +0 -123
- data/doc/files/lib/TOCEntry_rb.html +0 -119
- data/doc/files/lib/TableColumnDefinition_rb.html +0 -107
- data/doc/files/lib/TableOfContents_rb.html +0 -119
- data/doc/files/lib/TaskDependency_rb.html +0 -107
- data/doc/files/lib/TaskJuggler_rb.html +0 -125
- data/doc/files/lib/TaskScenario_rb.html +0 -117
- data/doc/files/lib/Task_rb.html +0 -119
- data/doc/files/lib/TextParser/Pattern_rb.html +0 -117
- data/doc/files/lib/TextParser/Rule_rb.html +0 -107
- data/doc/files/lib/TextParser/StackElement_rb.html +0 -107
- data/doc/files/lib/TextParser/TokenDoc_rb.html +0 -107
- data/doc/files/lib/TextParser_rb.html +0 -125
- data/doc/files/lib/TextScanner_rb.html +0 -129
- data/doc/files/lib/Tj3Config_rb.html +0 -119
- data/doc/files/lib/TjException_rb.html +0 -107
- data/doc/files/lib/TjTime_rb.html +0 -119
- data/doc/files/lib/TjpExample_rb.html +0 -117
- data/doc/files/lib/TjpSyntaxRules_rb.html +0 -107
- data/doc/files/lib/UTF8String_rb.html +0 -140
- data/doc/files/lib/UserManual_rb.html +0 -127
- data/doc/files/lib/WorkingHours_rb.html +0 -117
- data/doc/files/lib/XMLDocument_rb.html +0 -117
- data/doc/files/lib/XMLElement_rb.html +0 -117
- data/doc/files/lib/deep_copy_rb.html +0 -107
- data/doc/files/lib/reports/CSVFile_rb.html +0 -117
- data/doc/files/lib/reports/ColumnTable_rb.html +0 -117
- data/doc/files/lib/reports/GanttChart_rb.html +0 -123
- data/doc/files/lib/reports/GanttContainer_rb.html +0 -117
- data/doc/files/lib/reports/GanttHeaderScaleItem_rb.html +0 -107
- data/doc/files/lib/reports/GanttHeader_rb.html +0 -117
- data/doc/files/lib/reports/GanttLine_rb.html +0 -127
- data/doc/files/lib/reports/GanttLoadStack_rb.html +0 -117
- data/doc/files/lib/reports/GanttMilestone_rb.html +0 -117
- data/doc/files/lib/reports/GanttRouter_rb.html +0 -107
- data/doc/files/lib/reports/GanttTaskBar_rb.html +0 -117
- data/doc/files/lib/reports/HTMLGraphics_rb.html +0 -107
- data/doc/files/lib/reports/Navigator_rb.html +0 -117
- data/doc/files/lib/reports/ReportBase_rb.html +0 -107
- data/doc/files/lib/reports/ReportContext_rb.html +0 -107
- data/doc/files/lib/reports/ReportTableCell_rb.html +0 -107
- data/doc/files/lib/reports/ReportTableColumn_rb.html +0 -107
- data/doc/files/lib/reports/ReportTableLegend_rb.html +0 -107
- data/doc/files/lib/reports/ReportTableLine_rb.html +0 -117
- data/doc/files/lib/reports/ReportTable_rb.html +0 -119
- data/doc/files/lib/reports/Report_rb.html +0 -137
- data/doc/files/lib/reports/ResourceListRE_rb.html +0 -123
- data/doc/files/lib/reports/TableReport_rb.html +0 -125
- data/doc/files/lib/reports/TaskListRE_rb.html +0 -123
- data/doc/files/lib/reports/TextReport_rb.html +0 -117
- data/doc/files/lib/reports/TimeSheetReport_rb.html +0 -117
- data/doc/files/lib/reports/TjpExportRE_rb.html +0 -117
- data/doc/files/lib/taskjuggler3_rb.html +0 -298
- data/doc/files/lib/tj3client_rb.html +0 -280
- data/doc/files/lib/tj3man_rb.html +0 -190
- data/doc/fr_class_index.html +0 -345
- data/doc/fr_file_index.html +0 -247
- data/doc/fr_method_index.html +0 -2355
- data/doc/rdoc-style.css +0 -299
- data/lib/RemoteServiceManager.rb +0 -80
- data/lib/ReportServer.rb +0 -66
- data/test/TestSuite/HTML-Reports/Alerts.html +0 -172
- data/test/TestSuite/HTML-Reports/CellText.html +0 -758
- data/test/TestSuite/HTML-Reports/ColumnPeriods.html +0 -156
- data/test/TestSuite/HTML-Reports/IsOngoing.html +0 -172
- data/test/TestSuite/HTML-Reports/LogicalFunctions.html +0 -80
- data/test/TestSuite/HTML-Reports/Query.html +0 -31
- data/test/TestSuite/HTML-Reports/depArrows.html +0 -842
- data/test/TestSuite/Syntax/Correct/RawHTML.tjp +0 -31
- data/test/TestSuite/Syntax/Correct/icons/flag-green.png +0 -0
- data/test/TestSuite/Syntax/Correct/icons/flag-red.png +0 -0
- data/test/TestSuite/Syntax/Correct/icons/flag-yellow.png +0 -0
- data/test/TestSuite/Syntax/Correct/scripts/wz_tooltip.js +0 -1301
- data/test/TestSuite/Syntax/Errors/export_bad_extn.tjp +0 -9
@@ -0,0 +1,2590 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
3
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
4
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
5
|
+
<head>
|
6
|
+
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
|
7
|
+
|
8
|
+
<title>Class: TaskJuggler::TjTime</title>
|
9
|
+
|
10
|
+
<link rel="stylesheet" href="../rdoc.css" type="text/css" media="screen" />
|
11
|
+
|
12
|
+
<script src="../js/jquery.js" type="text/javascript"
|
13
|
+
charset="utf-8"></script>
|
14
|
+
<script src="../js/thickbox-compressed.js" type="text/javascript"
|
15
|
+
charset="utf-8"></script>
|
16
|
+
<script src="../js/quicksearch.js" type="text/javascript"
|
17
|
+
charset="utf-8"></script>
|
18
|
+
<script src="../js/darkfish.js" type="text/javascript"
|
19
|
+
charset="utf-8"></script>
|
20
|
+
|
21
|
+
</head>
|
22
|
+
<body class="class">
|
23
|
+
|
24
|
+
<div id="metadata">
|
25
|
+
<div id="home-metadata">
|
26
|
+
<div id="home-section" class="section">
|
27
|
+
<h3 class="section-header">
|
28
|
+
<a href="../index.html">Home</a>
|
29
|
+
<a href="../index.html#classes">Classes</a>
|
30
|
+
<a href="../index.html#methods">Methods</a>
|
31
|
+
</h3>
|
32
|
+
</div>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<div id="file-metadata">
|
36
|
+
<div id="file-list-section" class="section">
|
37
|
+
<h3 class="section-header">In Files</h3>
|
38
|
+
<div class="section-body">
|
39
|
+
<ul>
|
40
|
+
|
41
|
+
<li><a href="../lib/TjTime_rb.html?TB_iframe=true&height=550&width=785"
|
42
|
+
class="thickbox" title="lib/TjTime.rb">lib/TjTime.rb</a></li>
|
43
|
+
|
44
|
+
</ul>
|
45
|
+
</div>
|
46
|
+
</div>
|
47
|
+
|
48
|
+
|
49
|
+
</div>
|
50
|
+
|
51
|
+
<div id="class-metadata">
|
52
|
+
|
53
|
+
<!-- Parent Class -->
|
54
|
+
|
55
|
+
<div id="parent-class-section" class="section">
|
56
|
+
<h3 class="section-header">Parent</h3>
|
57
|
+
|
58
|
+
<p class="link"><a href="../Object.html">Object</a></p>
|
59
|
+
|
60
|
+
</div>
|
61
|
+
|
62
|
+
|
63
|
+
<!-- Namespace Contents -->
|
64
|
+
|
65
|
+
|
66
|
+
<!-- Method Quickref -->
|
67
|
+
|
68
|
+
<div id="method-list-section" class="section">
|
69
|
+
<h3 class="section-header">Methods</h3>
|
70
|
+
<ul class="link-list">
|
71
|
+
|
72
|
+
<li><a href="#M001406">::checkTimeZone</a></li>
|
73
|
+
|
74
|
+
<li><a href="#M001404">::gm</a></li>
|
75
|
+
|
76
|
+
<li><a href="#M001405">::local</a></li>
|
77
|
+
|
78
|
+
<li><a href="#M001402">::new</a></li>
|
79
|
+
|
80
|
+
<li><a href="#M001403">::now</a></li>
|
81
|
+
|
82
|
+
<li><a href="#M001411">#%</a></li>
|
83
|
+
|
84
|
+
<li><a href="#M001409">#+</a></li>
|
85
|
+
|
86
|
+
<li><a href="#M001410">#-</a></li>
|
87
|
+
|
88
|
+
<li><a href="#M001412">#<</a></li>
|
89
|
+
|
90
|
+
<li><a href="#M001413">#<=</a></li>
|
91
|
+
|
92
|
+
<li><a href="#M001417">#<=></a></li>
|
93
|
+
|
94
|
+
<li><a href="#M001416">#==</a></li>
|
95
|
+
|
96
|
+
<li><a href="#M001414">#></a></li>
|
97
|
+
|
98
|
+
<li><a href="#M001415">#>=</a></li>
|
99
|
+
|
100
|
+
<li><a href="#M001407">#align</a></li>
|
101
|
+
|
102
|
+
<li><a href="#M001419">#beginOfHour</a></li>
|
103
|
+
|
104
|
+
<li><a href="#M001422">#beginOfMonth</a></li>
|
105
|
+
|
106
|
+
<li><a href="#M001423">#beginOfQuarter</a></li>
|
107
|
+
|
108
|
+
<li><a href="#M001421">#beginOfWeek</a></li>
|
109
|
+
|
110
|
+
<li><a href="#M001424">#beginOfYear</a></li>
|
111
|
+
|
112
|
+
<li><a href="#M001448">#countIntervals</a></li>
|
113
|
+
|
114
|
+
<li><a href="#M001433">#daysTo</a></li>
|
115
|
+
|
116
|
+
<li><a href="#M001425">#hoursLater</a></li>
|
117
|
+
|
118
|
+
<li><a href="#M001432">#hoursTo</a></li>
|
119
|
+
|
120
|
+
<li><a href="#M001449">#leapYear?</a></li>
|
121
|
+
|
122
|
+
<li><a href="#M001446">#method_missing</a></li>
|
123
|
+
|
124
|
+
<li><a href="#M001420">#midnight</a></li>
|
125
|
+
|
126
|
+
<li><a href="#M001443">#monthAndYear</a></li>
|
127
|
+
|
128
|
+
<li><a href="#M001435">#monthsTo</a></li>
|
129
|
+
|
130
|
+
<li><a href="#M001445">#nextDayOfWeek</a></li>
|
131
|
+
|
132
|
+
<li><a href="#M001447">#order</a></li>
|
133
|
+
|
134
|
+
<li><a href="#M001441">#quarterName</a></li>
|
135
|
+
|
136
|
+
<li><a href="#M001436">#quartersTo</a></li>
|
137
|
+
|
138
|
+
<li><a href="#M001427">#sameTimeNextDay</a></li>
|
139
|
+
|
140
|
+
<li><a href="#M001426">#sameTimeNextHour</a></li>
|
141
|
+
|
142
|
+
<li><a href="#M001429">#sameTimeNextMonth</a></li>
|
143
|
+
|
144
|
+
<li><a href="#M001430">#sameTimeNextQuarter</a></li>
|
145
|
+
|
146
|
+
<li><a href="#M001428">#sameTimeNextWeek</a></li>
|
147
|
+
|
148
|
+
<li><a href="#M001431">#sameTimeNextYear</a></li>
|
149
|
+
|
150
|
+
<li><a href="#M001408">#secondsOfDay</a></li>
|
151
|
+
|
152
|
+
<li><a href="#M001440">#shortMonthName</a></li>
|
153
|
+
|
154
|
+
<li><a href="#M001439">#to_i</a></li>
|
155
|
+
|
156
|
+
<li><a href="#M001438">#to_s</a></li>
|
157
|
+
|
158
|
+
<li><a href="#M001418">#upto</a></li>
|
159
|
+
|
160
|
+
<li><a href="#M001442">#week</a></li>
|
161
|
+
|
162
|
+
<li><a href="#M001444">#weekdayAndDate</a></li>
|
163
|
+
|
164
|
+
<li><a href="#M001434">#weeksTo</a></li>
|
165
|
+
|
166
|
+
<li><a href="#M001437">#yearsTo</a></li>
|
167
|
+
|
168
|
+
</ul>
|
169
|
+
</div>
|
170
|
+
|
171
|
+
|
172
|
+
<!-- Included Modules -->
|
173
|
+
|
174
|
+
</div>
|
175
|
+
|
176
|
+
<div id="project-metadata">
|
177
|
+
|
178
|
+
|
179
|
+
<div id="fileindex-section" class="section project-section">
|
180
|
+
<h3 class="section-header">Files</h3>
|
181
|
+
<ul>
|
182
|
+
|
183
|
+
<li class="file"><a href="../COPYING.html">COPYING</a></li>
|
184
|
+
|
185
|
+
<li class="file"><a href="../README.html">README</a></li>
|
186
|
+
|
187
|
+
</ul>
|
188
|
+
</div>
|
189
|
+
|
190
|
+
|
191
|
+
<div id="classindex-section" class="section project-section">
|
192
|
+
<h3 class="section-header">Class Index
|
193
|
+
<span class="search-toggle"><img src="../images/find.png"
|
194
|
+
height="16" width="16" alt="[+]"
|
195
|
+
title="show/hide quicksearch" /></span></h3>
|
196
|
+
<form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
|
197
|
+
<fieldset>
|
198
|
+
<legend>Quicksearch</legend>
|
199
|
+
<input type="text" name="quicksearch" value=""
|
200
|
+
class="quicksearch-field" />
|
201
|
+
</fieldset>
|
202
|
+
</form>
|
203
|
+
|
204
|
+
<ul class="link-list">
|
205
|
+
|
206
|
+
<li><a href="../TaskJuggler.html">TaskJuggler</a></li>
|
207
|
+
|
208
|
+
<li><a href="../TaskJuggler/Account.html">TaskJuggler::Account</a></li>
|
209
|
+
|
210
|
+
<li><a href="../TaskJuggler/AccountAttribute.html">TaskJuggler::AccountAttribute</a></li>
|
211
|
+
|
212
|
+
<li><a href="../TaskJuggler/AccountScenario.html">TaskJuggler::AccountScenario</a></li>
|
213
|
+
|
214
|
+
<li><a href="../TaskJuggler/Allocation.html">TaskJuggler::Allocation</a></li>
|
215
|
+
|
216
|
+
<li><a href="../TaskJuggler/AllocationAttribute.html">TaskJuggler::AllocationAttribute</a></li>
|
217
|
+
|
218
|
+
<li><a href="../TaskJuggler/AttributeBase.html">TaskJuggler::AttributeBase</a></li>
|
219
|
+
|
220
|
+
<li><a href="../TaskJuggler/AttributeDefinition.html">TaskJuggler::AttributeDefinition</a></li>
|
221
|
+
|
222
|
+
<li><a href="../TaskJuggler/BatchProcessor.html">TaskJuggler::BatchProcessor</a></li>
|
223
|
+
|
224
|
+
<li><a href="../TaskJuggler/Booking.html">TaskJuggler::Booking</a></li>
|
225
|
+
|
226
|
+
<li><a href="../TaskJuggler/BookingListAttribute.html">TaskJuggler::BookingListAttribute</a></li>
|
227
|
+
|
228
|
+
<li><a href="../TaskJuggler/BooleanAttribute.html">TaskJuggler::BooleanAttribute</a></li>
|
229
|
+
|
230
|
+
<li><a href="../TaskJuggler/CSVFile.html">TaskJuggler::CSVFile</a></li>
|
231
|
+
|
232
|
+
<li><a href="../TaskJuggler/CellSettingPattern.html">TaskJuggler::CellSettingPattern</a></li>
|
233
|
+
|
234
|
+
<li><a href="../TaskJuggler/CellSettingPatternList.html">TaskJuggler::CellSettingPatternList</a></li>
|
235
|
+
|
236
|
+
<li><a href="../TaskJuggler/Charge.html">TaskJuggler::Charge</a></li>
|
237
|
+
|
238
|
+
<li><a href="../TaskJuggler/ChargeListAttribute.html">TaskJuggler::ChargeListAttribute</a></li>
|
239
|
+
|
240
|
+
<li><a href="../TaskJuggler/ChargeSet.html">TaskJuggler::ChargeSet</a></li>
|
241
|
+
|
242
|
+
<li><a href="../TaskJuggler/ChargeSetListAttribute.html">TaskJuggler::ChargeSetListAttribute</a></li>
|
243
|
+
|
244
|
+
<li><a href="../TaskJuggler/ColumnListAttribute.html">TaskJuggler::ColumnListAttribute</a></li>
|
245
|
+
|
246
|
+
<li><a href="../TaskJuggler/ColumnTable.html">TaskJuggler::ColumnTable</a></li>
|
247
|
+
|
248
|
+
<li><a href="../TaskJuggler/Daemon.html">TaskJuggler::Daemon</a></li>
|
249
|
+
|
250
|
+
<li><a href="../TaskJuggler/DateAttribute.html">TaskJuggler::DateAttribute</a></li>
|
251
|
+
|
252
|
+
<li><a href="../TaskJuggler/DefinitionListAttribute.html">TaskJuggler::DefinitionListAttribute</a></li>
|
253
|
+
|
254
|
+
<li><a href="../TaskJuggler/DependencyListAttribute.html">TaskJuggler::DependencyListAttribute</a></li>
|
255
|
+
|
256
|
+
<li><a href="../TaskJuggler/DurationAttribute.html">TaskJuggler::DurationAttribute</a></li>
|
257
|
+
|
258
|
+
<li><a href="../TaskJuggler/FixnumAttribute.html">TaskJuggler::FixnumAttribute</a></li>
|
259
|
+
|
260
|
+
<li><a href="../TaskJuggler/FlagListAttribute.html">TaskJuggler::FlagListAttribute</a></li>
|
261
|
+
|
262
|
+
<li><a href="../TaskJuggler/FloatAttribute.html">TaskJuggler::FloatAttribute</a></li>
|
263
|
+
|
264
|
+
<li><a href="../TaskJuggler/FormatListAttribute.html">TaskJuggler::FormatListAttribute</a></li>
|
265
|
+
|
266
|
+
<li><a href="../TaskJuggler/GanttChart.html">TaskJuggler::GanttChart</a></li>
|
267
|
+
|
268
|
+
<li><a href="../TaskJuggler/GanttContainer.html">TaskJuggler::GanttContainer</a></li>
|
269
|
+
|
270
|
+
<li><a href="../TaskJuggler/GanttHeader.html">TaskJuggler::GanttHeader</a></li>
|
271
|
+
|
272
|
+
<li><a href="../TaskJuggler/GanttHeaderScaleItem.html">TaskJuggler::GanttHeaderScaleItem</a></li>
|
273
|
+
|
274
|
+
<li><a href="../TaskJuggler/GanttLine.html">TaskJuggler::GanttLine</a></li>
|
275
|
+
|
276
|
+
<li><a href="../TaskJuggler/GanttLoadStack.html">TaskJuggler::GanttLoadStack</a></li>
|
277
|
+
|
278
|
+
<li><a href="../TaskJuggler/GanttMilestone.html">TaskJuggler::GanttMilestone</a></li>
|
279
|
+
|
280
|
+
<li><a href="../TaskJuggler/GanttRouter.html">TaskJuggler::GanttRouter</a></li>
|
281
|
+
|
282
|
+
<li><a href="../TaskJuggler/GanttTaskBar.html">TaskJuggler::GanttTaskBar</a></li>
|
283
|
+
|
284
|
+
<li><a href="../TaskJuggler/HTMLDocument.html">TaskJuggler::HTMLDocument</a></li>
|
285
|
+
|
286
|
+
<li><a href="../TaskJuggler/HTMLGraphics.html">TaskJuggler::HTMLGraphics</a></li>
|
287
|
+
|
288
|
+
<li><a href="../TaskJuggler/Interval.html">TaskJuggler::Interval</a></li>
|
289
|
+
|
290
|
+
<li><a href="../TaskJuggler/IntervalListAttribute.html">TaskJuggler::IntervalListAttribute</a></li>
|
291
|
+
|
292
|
+
<li><a href="../TaskJuggler/JobInfo.html">TaskJuggler::JobInfo</a></li>
|
293
|
+
|
294
|
+
<li><a href="../TaskJuggler/Journal.html">TaskJuggler::Journal</a></li>
|
295
|
+
|
296
|
+
<li><a href="../TaskJuggler/JournalEntry.html">TaskJuggler::JournalEntry</a></li>
|
297
|
+
|
298
|
+
<li><a href="../TaskJuggler/JournalEntryList.html">TaskJuggler::JournalEntryList</a></li>
|
299
|
+
|
300
|
+
<li><a href="../TaskJuggler/KeywordArray.html">TaskJuggler::KeywordArray</a></li>
|
301
|
+
|
302
|
+
<li><a href="../TaskJuggler/KeywordDocumentation.html">TaskJuggler::KeywordDocumentation</a></li>
|
303
|
+
|
304
|
+
<li><a href="../TaskJuggler/Limits.html">TaskJuggler::Limits</a></li>
|
305
|
+
|
306
|
+
<li><a href="../TaskJuggler/Limits/Limit.html">TaskJuggler::Limits::Limit</a></li>
|
307
|
+
|
308
|
+
<li><a href="../TaskJuggler/LimitsAttribute.html">TaskJuggler::LimitsAttribute</a></li>
|
309
|
+
|
310
|
+
<li><a href="../TaskJuggler/ListAttributeBase.html">TaskJuggler::ListAttributeBase</a></li>
|
311
|
+
|
312
|
+
<li><a href="../TaskJuggler/Log.html">TaskJuggler::Log</a></li>
|
313
|
+
|
314
|
+
<li><a href="../TaskJuggler/LogFile.html">TaskJuggler::LogFile</a></li>
|
315
|
+
|
316
|
+
<li><a href="../TaskJuggler/LogicalAttribute.html">TaskJuggler::LogicalAttribute</a></li>
|
317
|
+
|
318
|
+
<li><a href="../TaskJuggler/LogicalExpression.html">TaskJuggler::LogicalExpression</a></li>
|
319
|
+
|
320
|
+
<li><a href="../TaskJuggler/LogicalExpressionAttribute.html">TaskJuggler::LogicalExpressionAttribute</a></li>
|
321
|
+
|
322
|
+
<li><a href="../TaskJuggler/LogicalFlag.html">TaskJuggler::LogicalFlag</a></li>
|
323
|
+
|
324
|
+
<li><a href="../TaskJuggler/LogicalFunction.html">TaskJuggler::LogicalFunction</a></li>
|
325
|
+
|
326
|
+
<li><a href="../TaskJuggler/LogicalOperation.html">TaskJuggler::LogicalOperation</a></li>
|
327
|
+
|
328
|
+
<li><a href="../TaskJuggler/Macro.html">TaskJuggler::Macro</a></li>
|
329
|
+
|
330
|
+
<li><a href="../TaskJuggler/MacroParser.html">TaskJuggler::MacroParser</a></li>
|
331
|
+
|
332
|
+
<li><a href="../TaskJuggler/MacroTable.html">TaskJuggler::MacroTable</a></li>
|
333
|
+
|
334
|
+
<li><a href="../TaskJuggler/ManagerResponsibilities.html">TaskJuggler::ManagerResponsibilities</a></li>
|
335
|
+
|
336
|
+
<li><a href="../TaskJuggler/ManagerStatusRecord.html">TaskJuggler::ManagerStatusRecord</a></li>
|
337
|
+
|
338
|
+
<li><a href="../TaskJuggler/Message.html">TaskJuggler::Message</a></li>
|
339
|
+
|
340
|
+
<li><a href="../TaskJuggler/MessageHandler.html">TaskJuggler::MessageHandler</a></li>
|
341
|
+
|
342
|
+
<li><a href="../TaskJuggler/Navigator.html">TaskJuggler::Navigator</a></li>
|
343
|
+
|
344
|
+
<li><a href="../TaskJuggler/NavigatorElement.html">TaskJuggler::NavigatorElement</a></li>
|
345
|
+
|
346
|
+
<li><a href="../TaskJuggler/NikuProject.html">TaskJuggler::NikuProject</a></li>
|
347
|
+
|
348
|
+
<li><a href="../TaskJuggler/NikuReport.html">TaskJuggler::NikuReport</a></li>
|
349
|
+
|
350
|
+
<li><a href="../TaskJuggler/NikuResource.html">TaskJuggler::NikuResource</a></li>
|
351
|
+
|
352
|
+
<li><a href="../TaskJuggler/OnShiftCache.html">TaskJuggler::OnShiftCache</a></li>
|
353
|
+
|
354
|
+
<li><a href="../TaskJuggler/ProcessIntercom.html">TaskJuggler::ProcessIntercom</a></li>
|
355
|
+
|
356
|
+
<li><a href="../TaskJuggler/ProcessIntercomIface.html">TaskJuggler::ProcessIntercomIface</a></li>
|
357
|
+
|
358
|
+
<li><a href="../TaskJuggler/Project.html">TaskJuggler::Project</a></li>
|
359
|
+
|
360
|
+
<li><a href="../TaskJuggler/ProjectBroker.html">TaskJuggler::ProjectBroker</a></li>
|
361
|
+
|
362
|
+
<li><a href="../TaskJuggler/ProjectBrokerIface.html">TaskJuggler::ProjectBrokerIface</a></li>
|
363
|
+
|
364
|
+
<li><a href="../TaskJuggler/ProjectFileParser.html">TaskJuggler::ProjectFileParser</a></li>
|
365
|
+
|
366
|
+
<li><a href="../TaskJuggler/ProjectRecord.html">TaskJuggler::ProjectRecord</a></li>
|
367
|
+
|
368
|
+
<li><a href="../TaskJuggler/ProjectServer.html">TaskJuggler::ProjectServer</a></li>
|
369
|
+
|
370
|
+
<li><a href="../TaskJuggler/ProjectServerIface.html">TaskJuggler::ProjectServerIface</a></li>
|
371
|
+
|
372
|
+
<li><a href="../TaskJuggler/PropertyAttribute.html">TaskJuggler::PropertyAttribute</a></li>
|
373
|
+
|
374
|
+
<li><a href="../TaskJuggler/PropertyList.html">TaskJuggler::PropertyList</a></li>
|
375
|
+
|
376
|
+
<li><a href="../TaskJuggler/PropertySet.html">TaskJuggler::PropertySet</a></li>
|
377
|
+
|
378
|
+
<li><a href="../TaskJuggler/PropertyTreeNode.html">TaskJuggler::PropertyTreeNode</a></li>
|
379
|
+
|
380
|
+
<li><a href="../TaskJuggler/Query.html">TaskJuggler::Query</a></li>
|
381
|
+
|
382
|
+
<li><a href="../TaskJuggler/RTFNavigator.html">TaskJuggler::RTFNavigator</a></li>
|
383
|
+
|
384
|
+
<li><a href="../TaskJuggler/RTFQuery.html">TaskJuggler::RTFQuery</a></li>
|
385
|
+
|
386
|
+
<li><a href="../TaskJuggler/RTFReport.html">TaskJuggler::RTFReport</a></li>
|
387
|
+
|
388
|
+
<li><a href="../TaskJuggler/RealFormat.html">TaskJuggler::RealFormat</a></li>
|
389
|
+
|
390
|
+
<li><a href="../TaskJuggler/RealFormatAttribute.html">TaskJuggler::RealFormatAttribute</a></li>
|
391
|
+
|
392
|
+
<li><a href="../TaskJuggler/ReferenceAttribute.html">TaskJuggler::ReferenceAttribute</a></li>
|
393
|
+
|
394
|
+
<li><a href="../TaskJuggler/Report.html">TaskJuggler::Report</a></li>
|
395
|
+
|
396
|
+
<li><a href="../TaskJuggler/ReportBase.html">TaskJuggler::ReportBase</a></li>
|
397
|
+
|
398
|
+
<li><a href="../TaskJuggler/ReportContext.html">TaskJuggler::ReportContext</a></li>
|
399
|
+
|
400
|
+
<li><a href="../TaskJuggler/ReportServer.html">TaskJuggler::ReportServer</a></li>
|
401
|
+
|
402
|
+
<li><a href="../TaskJuggler/ReportServerIface.html">TaskJuggler::ReportServerIface</a></li>
|
403
|
+
|
404
|
+
<li><a href="../TaskJuggler/ReportServerRecord.html">TaskJuggler::ReportServerRecord</a></li>
|
405
|
+
|
406
|
+
<li><a href="../TaskJuggler/ReportTable.html">TaskJuggler::ReportTable</a></li>
|
407
|
+
|
408
|
+
<li><a href="../TaskJuggler/ReportTableCell.html">TaskJuggler::ReportTableCell</a></li>
|
409
|
+
|
410
|
+
<li><a href="../TaskJuggler/ReportTableColumn.html">TaskJuggler::ReportTableColumn</a></li>
|
411
|
+
|
412
|
+
<li><a href="../TaskJuggler/ReportTableLegend.html">TaskJuggler::ReportTableLegend</a></li>
|
413
|
+
|
414
|
+
<li><a href="../TaskJuggler/ReportTableLine.html">TaskJuggler::ReportTableLine</a></li>
|
415
|
+
|
416
|
+
<li><a href="../TaskJuggler/Resource.html">TaskJuggler::Resource</a></li>
|
417
|
+
|
418
|
+
<li><a href="../TaskJuggler/ResourceListAttribute.html">TaskJuggler::ResourceListAttribute</a></li>
|
419
|
+
|
420
|
+
<li><a href="../TaskJuggler/ResourceListRE.html">TaskJuggler::ResourceListRE</a></li>
|
421
|
+
|
422
|
+
<li><a href="../TaskJuggler/ResourceScenario.html">TaskJuggler::ResourceScenario</a></li>
|
423
|
+
|
424
|
+
<li><a href="../TaskJuggler/RichText.html">TaskJuggler::RichText</a></li>
|
425
|
+
|
426
|
+
<li><a href="../TaskJuggler/RichTextAttribute.html">TaskJuggler::RichTextAttribute</a></li>
|
427
|
+
|
428
|
+
<li><a href="../TaskJuggler/RichTextDocument.html">TaskJuggler::RichTextDocument</a></li>
|
429
|
+
|
430
|
+
<li><a href="../TaskJuggler/RichTextElement.html">TaskJuggler::RichTextElement</a></li>
|
431
|
+
|
432
|
+
<li><a href="../TaskJuggler/RichTextException.html">TaskJuggler::RichTextException</a></li>
|
433
|
+
|
434
|
+
<li><a href="../TaskJuggler/RichTextFunctionExample.html">TaskJuggler::RichTextFunctionExample</a></li>
|
435
|
+
|
436
|
+
<li><a href="../TaskJuggler/RichTextFunctionHandler.html">TaskJuggler::RichTextFunctionHandler</a></li>
|
437
|
+
|
438
|
+
<li><a href="../TaskJuggler/RichTextImage.html">TaskJuggler::RichTextImage</a></li>
|
439
|
+
|
440
|
+
<li><a href="../TaskJuggler/RichTextIntermediate.html">TaskJuggler::RichTextIntermediate</a></li>
|
441
|
+
|
442
|
+
<li><a href="../TaskJuggler/RichTextParser.html">TaskJuggler::RichTextParser</a></li>
|
443
|
+
|
444
|
+
<li><a href="../TaskJuggler/RichTextScanner.html">TaskJuggler::RichTextScanner</a></li>
|
445
|
+
|
446
|
+
<li><a href="../TaskJuggler/RichTextSnip.html">TaskJuggler::RichTextSnip</a></li>
|
447
|
+
|
448
|
+
<li><a href="../TaskJuggler/RichTextSyntaxRules.html">TaskJuggler::RichTextSyntaxRules</a></li>
|
449
|
+
|
450
|
+
<li><a href="../TaskJuggler/Scenario.html">TaskJuggler::Scenario</a></li>
|
451
|
+
|
452
|
+
<li><a href="../TaskJuggler/ScenarioData.html">TaskJuggler::ScenarioData</a></li>
|
453
|
+
|
454
|
+
<li><a href="../TaskJuggler/ScenarioListAttribute.html">TaskJuggler::ScenarioListAttribute</a></li>
|
455
|
+
|
456
|
+
<li><a href="../TaskJuggler/Scoreboard.html">TaskJuggler::Scoreboard</a></li>
|
457
|
+
|
458
|
+
<li><a href="../TaskJuggler/SheetHandlerBase.html">TaskJuggler::SheetHandlerBase</a></li>
|
459
|
+
|
460
|
+
<li><a href="../TaskJuggler/SheetReceiver.html">TaskJuggler::SheetReceiver</a></li>
|
461
|
+
|
462
|
+
<li><a href="../TaskJuggler/SheetSender.html">TaskJuggler::SheetSender</a></li>
|
463
|
+
|
464
|
+
<li><a href="../TaskJuggler/Shift.html">TaskJuggler::Shift</a></li>
|
465
|
+
|
466
|
+
<li><a href="../TaskJuggler/ShiftAssignment.html">TaskJuggler::ShiftAssignment</a></li>
|
467
|
+
|
468
|
+
<li><a href="../TaskJuggler/ShiftAssignments.html">TaskJuggler::ShiftAssignments</a></li>
|
469
|
+
|
470
|
+
<li><a href="../TaskJuggler/ShiftAssignmentsAttribute.html">TaskJuggler::ShiftAssignmentsAttribute</a></li>
|
471
|
+
|
472
|
+
<li><a href="../TaskJuggler/ShiftScenario.html">TaskJuggler::ShiftScenario</a></li>
|
473
|
+
|
474
|
+
<li><a href="../TaskJuggler/SortListAttribute.html">TaskJuggler::SortListAttribute</a></li>
|
475
|
+
|
476
|
+
<li><a href="../TaskJuggler/SourceFileInfo.html">TaskJuggler::SourceFileInfo</a></li>
|
477
|
+
|
478
|
+
<li><a href="../TaskJuggler/StatusSheetReceiver.html">TaskJuggler::StatusSheetReceiver</a></li>
|
479
|
+
|
480
|
+
<li><a href="../TaskJuggler/StatusSheetReport.html">TaskJuggler::StatusSheetReport</a></li>
|
481
|
+
|
482
|
+
<li><a href="../TaskJuggler/StatusSheetSender.html">TaskJuggler::StatusSheetSender</a></li>
|
483
|
+
|
484
|
+
<li><a href="../TaskJuggler/StringAttribute.html">TaskJuggler::StringAttribute</a></li>
|
485
|
+
|
486
|
+
<li><a href="../TaskJuggler/SymbolAttribute.html">TaskJuggler::SymbolAttribute</a></li>
|
487
|
+
|
488
|
+
<li><a href="../TaskJuggler/SyntaxReference.html">TaskJuggler::SyntaxReference</a></li>
|
489
|
+
|
490
|
+
<li><a href="../TaskJuggler/TOCEntry.html">TaskJuggler::TOCEntry</a></li>
|
491
|
+
|
492
|
+
<li><a href="../TaskJuggler/TSResourceRecord.html">TaskJuggler::TSResourceRecord</a></li>
|
493
|
+
|
494
|
+
<li><a href="../TaskJuggler/TSTaskRecord.html">TaskJuggler::TSTaskRecord</a></li>
|
495
|
+
|
496
|
+
<li><a href="../TaskJuggler/TableColumnDefinition.html">TaskJuggler::TableColumnDefinition</a></li>
|
497
|
+
|
498
|
+
<li><a href="../TaskJuggler/TableOfContents.html">TaskJuggler::TableOfContents</a></li>
|
499
|
+
|
500
|
+
<li><a href="../TaskJuggler/TableReport.html">TaskJuggler::TableReport</a></li>
|
501
|
+
|
502
|
+
<li><a href="../TaskJuggler/Task.html">TaskJuggler::Task</a></li>
|
503
|
+
|
504
|
+
<li><a href="../TaskJuggler/TaskDependency.html">TaskJuggler::TaskDependency</a></li>
|
505
|
+
|
506
|
+
<li><a href="../TaskJuggler/TaskListAttribute.html">TaskJuggler::TaskListAttribute</a></li>
|
507
|
+
|
508
|
+
<li><a href="../TaskJuggler/TaskListRE.html">TaskJuggler::TaskListRE</a></li>
|
509
|
+
|
510
|
+
<li><a href="../TaskJuggler/TaskScenario.html">TaskJuggler::TaskScenario</a></li>
|
511
|
+
|
512
|
+
<li><a href="../TaskJuggler/TextFormatter.html">TaskJuggler::TextFormatter</a></li>
|
513
|
+
|
514
|
+
<li><a href="../TaskJuggler/TextParser.html">TaskJuggler::TextParser</a></li>
|
515
|
+
|
516
|
+
<li><a href="../TaskJuggler/TextParser/Pattern.html">TaskJuggler::TextParser::Pattern</a></li>
|
517
|
+
|
518
|
+
<li><a href="../TaskJuggler/TextParser/Rule.html">TaskJuggler::TextParser::Rule</a></li>
|
519
|
+
|
520
|
+
<li><a href="../TaskJuggler/TextParser/StackElement.html">TaskJuggler::TextParser::StackElement</a></li>
|
521
|
+
|
522
|
+
<li><a href="../TaskJuggler/TextParser/TextParserResultArray.html">TaskJuggler::TextParser::TextParserResultArray</a></li>
|
523
|
+
|
524
|
+
<li><a href="../TaskJuggler/TextParser/TokenDoc.html">TaskJuggler::TextParser::TokenDoc</a></li>
|
525
|
+
|
526
|
+
<li><a href="../TaskJuggler/TextReport.html">TaskJuggler::TextReport</a></li>
|
527
|
+
|
528
|
+
<li><a href="../TaskJuggler/TextScanner.html">TaskJuggler::TextScanner</a></li>
|
529
|
+
|
530
|
+
<li><a href="../TaskJuggler/TextScanner/BufferStreamHandle.html">TaskJuggler::TextScanner::BufferStreamHandle</a></li>
|
531
|
+
|
532
|
+
<li><a href="../TaskJuggler/TextScanner/FileStreamHandle.html">TaskJuggler::TextScanner::FileStreamHandle</a></li>
|
533
|
+
|
534
|
+
<li><a href="../TaskJuggler/TextScanner/StreamHandle.html">TaskJuggler::TextScanner::StreamHandle</a></li>
|
535
|
+
|
536
|
+
<li><a href="../TaskJuggler/TimeSheet.html">TaskJuggler::TimeSheet</a></li>
|
537
|
+
|
538
|
+
<li><a href="../TaskJuggler/TimeSheetReceiver.html">TaskJuggler::TimeSheetReceiver</a></li>
|
539
|
+
|
540
|
+
<li><a href="../TaskJuggler/TimeSheetRecord.html">TaskJuggler::TimeSheetRecord</a></li>
|
541
|
+
|
542
|
+
<li><a href="../TaskJuggler/TimeSheetReport.html">TaskJuggler::TimeSheetReport</a></li>
|
543
|
+
|
544
|
+
<li><a href="../TaskJuggler/TimeSheetSender.html">TaskJuggler::TimeSheetSender</a></li>
|
545
|
+
|
546
|
+
<li><a href="../TaskJuggler/TimeSheetSummary.html">TaskJuggler::TimeSheetSummary</a></li>
|
547
|
+
|
548
|
+
<li><a href="../TaskJuggler/TimeSheets.html">TaskJuggler::TimeSheets</a></li>
|
549
|
+
|
550
|
+
<li><a href="../TaskJuggler/Tj3AppBase.html">TaskJuggler::Tj3AppBase</a></li>
|
551
|
+
|
552
|
+
<li><a href="../TaskJuggler/Tj3Client.html">TaskJuggler::Tj3Client</a></li>
|
553
|
+
|
554
|
+
<li><a href="../TaskJuggler/Tj3Daemon.html">TaskJuggler::Tj3Daemon</a></li>
|
555
|
+
|
556
|
+
<li><a href="../TaskJuggler/Tj3SheetAppBase.html">TaskJuggler::Tj3SheetAppBase</a></li>
|
557
|
+
|
558
|
+
<li><a href="../TaskJuggler/Tj3SsReceiver.html">TaskJuggler::Tj3SsReceiver</a></li>
|
559
|
+
|
560
|
+
<li><a href="../TaskJuggler/Tj3SsSender.html">TaskJuggler::Tj3SsSender</a></li>
|
561
|
+
|
562
|
+
<li><a href="../TaskJuggler/Tj3TsReceiver.html">TaskJuggler::Tj3TsReceiver</a></li>
|
563
|
+
|
564
|
+
<li><a href="../TaskJuggler/Tj3TsSender.html">TaskJuggler::Tj3TsSender</a></li>
|
565
|
+
|
566
|
+
<li><a href="../TaskJuggler/Tj3TsSummary.html">TaskJuggler::Tj3TsSummary</a></li>
|
567
|
+
|
568
|
+
<li><a href="../TaskJuggler/TjException.html">TaskJuggler::TjException</a></li>
|
569
|
+
|
570
|
+
<li><a href="../TaskJuggler/TjTime.html">TaskJuggler::TjTime</a></li>
|
571
|
+
|
572
|
+
<li><a href="../TaskJuggler/TjpExample.html">TaskJuggler::TjpExample</a></li>
|
573
|
+
|
574
|
+
<li><a href="../TaskJuggler/TjpExportRE.html">TaskJuggler::TjpExportRE</a></li>
|
575
|
+
|
576
|
+
<li><a href="../TaskJuggler/TjpSyntaxRules.html">TaskJuggler::TjpSyntaxRules</a></li>
|
577
|
+
|
578
|
+
<li><a href="../TaskJuggler/UserManual.html">TaskJuggler::UserManual</a></li>
|
579
|
+
|
580
|
+
<li><a href="../TaskJuggler/WorkingHours.html">TaskJuggler::WorkingHours</a></li>
|
581
|
+
|
582
|
+
<li><a href="../TaskJuggler/WorkingHoursAttribute.html">TaskJuggler::WorkingHoursAttribute</a></li>
|
583
|
+
|
584
|
+
<li><a href="../TaskJuggler/XMLBlob.html">TaskJuggler::XMLBlob</a></li>
|
585
|
+
|
586
|
+
<li><a href="../TaskJuggler/XMLComment.html">TaskJuggler::XMLComment</a></li>
|
587
|
+
|
588
|
+
<li><a href="../TaskJuggler/XMLDocument.html">TaskJuggler::XMLDocument</a></li>
|
589
|
+
|
590
|
+
<li><a href="../TaskJuggler/XMLElement.html">TaskJuggler::XMLElement</a></li>
|
591
|
+
|
592
|
+
<li><a href="../TaskJuggler/XMLNamedText.html">TaskJuggler::XMLNamedText</a></li>
|
593
|
+
|
594
|
+
<li><a href="../TaskJuggler/XMLText.html">TaskJuggler::XMLText</a></li>
|
595
|
+
|
596
|
+
<li><a href="../AppConfig.html">AppConfig</a></li>
|
597
|
+
|
598
|
+
<li><a href="../Arguments.html">Arguments</a></li>
|
599
|
+
|
600
|
+
<li><a href="../Object.html">Object</a></li>
|
601
|
+
|
602
|
+
<li><a href="../RuntimeConfig.html">RuntimeConfig</a></li>
|
603
|
+
|
604
|
+
<li><a href="../String.html">String</a></li>
|
605
|
+
|
606
|
+
</ul>
|
607
|
+
<div id="no-class-search-results" style="display: none;">No matching classes.</div>
|
608
|
+
</div>
|
609
|
+
|
610
|
+
|
611
|
+
</div>
|
612
|
+
</div>
|
613
|
+
|
614
|
+
<div id="documentation">
|
615
|
+
<h1 class="class">TaskJuggler::TjTime</h1>
|
616
|
+
|
617
|
+
<div id="description">
|
618
|
+
<p>
|
619
|
+
The <a href="TjTime.html">TjTime</a> class is based on the original Ruby
|
620
|
+
class Time but provides lots of additional functionality.
|
621
|
+
</p>
|
622
|
+
|
623
|
+
</div>
|
624
|
+
|
625
|
+
<!-- Constants -->
|
626
|
+
|
627
|
+
<div id="constants-list" class="section">
|
628
|
+
<h3 class="section-header">Constants</h3>
|
629
|
+
<dl>
|
630
|
+
|
631
|
+
<dt><a name="MON_MAX">MON_MAX</a></dt>
|
632
|
+
|
633
|
+
<dd class="description"><p>
|
634
|
+
The number of days per month. Leap years are taken care of separately.
|
635
|
+
</p></dd>
|
636
|
+
|
637
|
+
|
638
|
+
</dl>
|
639
|
+
</div>
|
640
|
+
|
641
|
+
|
642
|
+
<!-- Attributes -->
|
643
|
+
|
644
|
+
<div id="attribute-method-details" class="method-section section">
|
645
|
+
<h3 class="section-header">Attributes</h3>
|
646
|
+
|
647
|
+
|
648
|
+
<div id="time-attribute-method" class="method-detail">
|
649
|
+
<a name="time"></a>
|
650
|
+
|
651
|
+
<div class="method-heading attribute-method-heading">
|
652
|
+
<span class="method-name">time</span><span
|
653
|
+
class="attribute-access-type">[R]</span>
|
654
|
+
</div>
|
655
|
+
|
656
|
+
<div class="method-description">
|
657
|
+
|
658
|
+
|
659
|
+
|
660
|
+
</div>
|
661
|
+
</div>
|
662
|
+
|
663
|
+
</div>
|
664
|
+
|
665
|
+
|
666
|
+
<!-- Methods -->
|
667
|
+
|
668
|
+
<div id="public-class-method-details" class="method-section section">
|
669
|
+
<h3 class="section-header">Public Class Methods</h3>
|
670
|
+
|
671
|
+
|
672
|
+
<div id="check-ime-one-method" class="method-detail ">
|
673
|
+
<a name="M001406"></a>
|
674
|
+
|
675
|
+
<div class="method-heading">
|
676
|
+
|
677
|
+
<span class="method-name">checkTimeZone</span><span
|
678
|
+
class="method-args">(zone)</span>
|
679
|
+
<span class="method-click-advice">click to toggle source</span>
|
680
|
+
|
681
|
+
</div>
|
682
|
+
|
683
|
+
<div class="method-description">
|
684
|
+
|
685
|
+
<p>
|
686
|
+
Check if <tt>zone</tt> is a valid time zone.
|
687
|
+
</p>
|
688
|
+
|
689
|
+
|
690
|
+
|
691
|
+
<div class="method-source-code"
|
692
|
+
id="check-ime-one-source">
|
693
|
+
<pre>
|
694
|
+
<span class="ruby-comment cmt"># File lib/TjTime.rb, line 64</span>
|
695
|
+
64: <span class="ruby-keyword kw">def</span> <span class="ruby-constant">TjTime</span>.<span class="ruby-identifier">checkTimeZone</span>(<span class="ruby-identifier">zone</span>)
|
696
|
+
65: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">zone</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'UTC'</span>
|
697
|
+
66:
|
698
|
+
67: <span class="ruby-comment cmt"># Valid time zones must be of the form 'Region/City'</span>
|
699
|
+
68: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">zone</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-value str">'/'</span>)
|
700
|
+
69:
|
701
|
+
70: <span class="ruby-comment cmt"># Save curent value of TZ</span>
|
702
|
+
71: <span class="ruby-identifier">tz</span> = <span class="ruby-constant">ENV</span>[<span class="ruby-value str">'TZ'</span>]
|
703
|
+
72: <span class="ruby-constant">ENV</span>[<span class="ruby-value str">'TZ'</span>] = <span class="ruby-identifier">zone</span>
|
704
|
+
73: <span class="ruby-identifier">newZone</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">new</span>.<span class="ruby-identifier">zone</span>
|
705
|
+
74: <span class="ruby-comment cmt"># If the time zone is valid, the OS can convert a zone like</span>
|
706
|
+
75: <span class="ruby-comment cmt"># 'America/Denver' into 'MST'. Unknown time zones are either not</span>
|
707
|
+
76: <span class="ruby-comment cmt"># converted or cause a fallback to UTC.</span>
|
708
|
+
77: <span class="ruby-comment cmt"># Since glibc 2.10 Time.new.zone only return the region for illegal</span>
|
709
|
+
78: <span class="ruby-comment cmt"># zones instead of the full zone string like it does on earlier</span>
|
710
|
+
79: <span class="ruby-comment cmt"># versions.</span>
|
711
|
+
80: <span class="ruby-identifier">region</span> = <span class="ruby-identifier">zone</span>[<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-identifier">zone</span>.<span class="ruby-identifier">index</span>(<span class="ruby-value str">'/'</span>) <span class="ruby-operator">-</span> <span class="ruby-value">1</span>]
|
712
|
+
81: <span class="ruby-identifier">res</span> = (<span class="ruby-identifier">newZone</span> <span class="ruby-operator">!=</span> <span class="ruby-identifier">zone</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">newZone</span> <span class="ruby-operator">!=</span> <span class="ruby-identifier">region</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">newZone</span> <span class="ruby-operator">!=</span> <span class="ruby-value str">'UTC'</span>)
|
713
|
+
82: <span class="ruby-comment cmt"># Restore TZ if it was set earlier.</span>
|
714
|
+
83: <span class="ruby-constant">ENV</span>[<span class="ruby-value str">'TZ'</span>] = <span class="ruby-identifier">tz</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">tz</span>
|
715
|
+
84: <span class="ruby-identifier">res</span>
|
716
|
+
85: <span class="ruby-keyword kw">end</span></pre>
|
717
|
+
</div>
|
718
|
+
|
719
|
+
</div>
|
720
|
+
|
721
|
+
|
722
|
+
|
723
|
+
|
724
|
+
</div>
|
725
|
+
|
726
|
+
|
727
|
+
<div id="gm-method" class="method-detail ">
|
728
|
+
<a name="M001404"></a>
|
729
|
+
|
730
|
+
<div class="method-heading">
|
731
|
+
|
732
|
+
<span class="method-name">gm</span><span
|
733
|
+
class="method-args">(*args)</span>
|
734
|
+
<span class="method-click-advice">click to toggle source</span>
|
735
|
+
|
736
|
+
</div>
|
737
|
+
|
738
|
+
<div class="method-description">
|
739
|
+
|
740
|
+
<p>
|
741
|
+
Creates a time based on given values, interpreted as UTC. See Time.gm() for
|
742
|
+
details.
|
743
|
+
</p>
|
744
|
+
|
745
|
+
|
746
|
+
|
747
|
+
<div class="method-source-code"
|
748
|
+
id="gm-source">
|
749
|
+
<pre>
|
750
|
+
<span class="ruby-comment cmt"># File lib/TjTime.rb, line 53</span>
|
751
|
+
53: <span class="ruby-keyword kw">def</span> <span class="ruby-constant">TjTime</span>.<span class="ruby-identifier">gm</span>(*<span class="ruby-identifier">args</span>)
|
752
|
+
54: <span class="ruby-constant">TjTime</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">Time</span>.<span class="ruby-identifier">gm</span>(*<span class="ruby-identifier">args</span>))
|
753
|
+
55: <span class="ruby-keyword kw">end</span></pre>
|
754
|
+
</div>
|
755
|
+
|
756
|
+
</div>
|
757
|
+
|
758
|
+
|
759
|
+
|
760
|
+
|
761
|
+
</div>
|
762
|
+
|
763
|
+
|
764
|
+
<div id="local-method" class="method-detail ">
|
765
|
+
<a name="M001405"></a>
|
766
|
+
|
767
|
+
<div class="method-heading">
|
768
|
+
|
769
|
+
<span class="method-name">local</span><span
|
770
|
+
class="method-args">(*args)</span>
|
771
|
+
<span class="method-click-advice">click to toggle source</span>
|
772
|
+
|
773
|
+
</div>
|
774
|
+
|
775
|
+
<div class="method-description">
|
776
|
+
|
777
|
+
<p>
|
778
|
+
Creates a time based on given values, interpreted as local time. The result
|
779
|
+
is stored as UTC time, though. See Time.local() for details.
|
780
|
+
</p>
|
781
|
+
|
782
|
+
|
783
|
+
|
784
|
+
<div class="method-source-code"
|
785
|
+
id="local-source">
|
786
|
+
<pre>
|
787
|
+
<span class="ruby-comment cmt"># File lib/TjTime.rb, line 59</span>
|
788
|
+
59: <span class="ruby-keyword kw">def</span> <span class="ruby-constant">TjTime</span>.<span class="ruby-identifier">local</span>(*<span class="ruby-identifier">args</span>)
|
789
|
+
60: <span class="ruby-constant">TjTime</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">Time</span>.<span class="ruby-identifier">local</span>(*<span class="ruby-identifier">args</span>).<span class="ruby-identifier">gmtime</span>)
|
790
|
+
61: <span class="ruby-keyword kw">end</span></pre>
|
791
|
+
</div>
|
792
|
+
|
793
|
+
</div>
|
794
|
+
|
795
|
+
|
796
|
+
|
797
|
+
|
798
|
+
</div>
|
799
|
+
|
800
|
+
|
801
|
+
<div id="new-method" class="method-detail ">
|
802
|
+
<a name="M001402"></a>
|
803
|
+
|
804
|
+
<div class="method-heading">
|
805
|
+
|
806
|
+
<span class="method-callseq">TjTime(time) → Scenario
|
807
|
+
TjTime(s) → Scenario
|
808
|
+
TjTime(secs) → Scenario</span>
|
809
|
+
<span class="method-click-advice">click to toggle source</span>
|
810
|
+
|
811
|
+
</div>
|
812
|
+
|
813
|
+
<div class="method-description">
|
814
|
+
|
815
|
+
<p>
|
816
|
+
The constructor is overloaded and accepts 3 kinds of arguments. If
|
817
|
+
<em>t</em> is a Time object this is just copied to the @time variable. If
|
818
|
+
it’s a string, it is parsed as a date. Or else it is interpreted as
|
819
|
+
seconds after Epoch.
|
820
|
+
</p>
|
821
|
+
|
822
|
+
|
823
|
+
|
824
|
+
<div class="method-source-code"
|
825
|
+
id="new-source">
|
826
|
+
<pre>
|
827
|
+
<span class="ruby-comment cmt"># File lib/TjTime.rb, line 35</span>
|
828
|
+
35: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">t</span>)
|
829
|
+
36: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">t</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Time</span>)
|
830
|
+
37: <span class="ruby-ivar">@time</span> = <span class="ruby-identifier">t</span>
|
831
|
+
38: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">t</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">String</span>)
|
832
|
+
39: <span class="ruby-identifier">d</span> = <span class="ruby-constant">DateTime</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">t</span>)
|
833
|
+
40: <span class="ruby-ivar">@time</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">mktime</span>(<span class="ruby-identifier">d</span>.<span class="ruby-identifier">year</span>, <span class="ruby-identifier">d</span>.<span class="ruby-identifier">mon</span>, <span class="ruby-identifier">d</span>.<span class="ruby-identifier">day</span>, <span class="ruby-identifier">d</span>.<span class="ruby-identifier">hour</span>, <span class="ruby-identifier">d</span>.<span class="ruby-identifier">min</span>, <span class="ruby-identifier">d</span>.<span class="ruby-identifier">sec</span>)
|
834
|
+
41: <span class="ruby-keyword kw">else</span>
|
835
|
+
42: <span class="ruby-ivar">@time</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">at</span>(<span class="ruby-identifier">t</span>)
|
836
|
+
43: <span class="ruby-keyword kw">end</span>
|
837
|
+
44: <span class="ruby-keyword kw">end</span></pre>
|
838
|
+
</div>
|
839
|
+
|
840
|
+
</div>
|
841
|
+
|
842
|
+
|
843
|
+
|
844
|
+
|
845
|
+
</div>
|
846
|
+
|
847
|
+
|
848
|
+
<div id="now-method" class="method-detail ">
|
849
|
+
<a name="M001403"></a>
|
850
|
+
|
851
|
+
<div class="method-heading">
|
852
|
+
|
853
|
+
<span class="method-name">now</span><span
|
854
|
+
class="method-args">()</span>
|
855
|
+
<span class="method-click-advice">click to toggle source</span>
|
856
|
+
|
857
|
+
</div>
|
858
|
+
|
859
|
+
<div class="method-description">
|
860
|
+
|
861
|
+
<p>
|
862
|
+
Returns the current UTC time as Time object.
|
863
|
+
</p>
|
864
|
+
|
865
|
+
|
866
|
+
|
867
|
+
<div class="method-source-code"
|
868
|
+
id="now-source">
|
869
|
+
<pre>
|
870
|
+
<span class="ruby-comment cmt"># File lib/TjTime.rb, line 47</span>
|
871
|
+
47: <span class="ruby-keyword kw">def</span> <span class="ruby-constant">TjTime</span>.<span class="ruby-identifier">now</span>
|
872
|
+
48: <span class="ruby-constant">TjTime</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span>.<span class="ruby-identifier">gmtime</span>)
|
873
|
+
49: <span class="ruby-keyword kw">end</span></pre>
|
874
|
+
</div>
|
875
|
+
|
876
|
+
</div>
|
877
|
+
|
878
|
+
|
879
|
+
|
880
|
+
|
881
|
+
</div>
|
882
|
+
|
883
|
+
|
884
|
+
</div>
|
885
|
+
|
886
|
+
<div id="public-instance-method-details" class="method-section section">
|
887
|
+
<h3 class="section-header">Public Instance Methods</h3>
|
888
|
+
|
889
|
+
|
890
|
+
<div id="--method" class="method-detail ">
|
891
|
+
<a name="M001411"></a>
|
892
|
+
|
893
|
+
<div class="method-heading">
|
894
|
+
|
895
|
+
<span class="method-name">%</span><span
|
896
|
+
class="method-args">(val)</span>
|
897
|
+
<span class="method-click-advice">click to toggle source</span>
|
898
|
+
|
899
|
+
</div>
|
900
|
+
|
901
|
+
<div class="method-description">
|
902
|
+
|
903
|
+
<p>
|
904
|
+
Convert the time to seconds since Epoch and return the module of
|
905
|
+
<em>val</em>.
|
906
|
+
</p>
|
907
|
+
|
908
|
+
|
909
|
+
|
910
|
+
<div class="method-source-code"
|
911
|
+
id="--source">
|
912
|
+
<pre>
|
913
|
+
<span class="ruby-comment cmt"># File lib/TjTime.rb, line 115</span>
|
914
|
+
115: <span class="ruby-keyword kw">def</span> <span class="ruby-operator">%</span>(<span class="ruby-identifier">val</span>)
|
915
|
+
116: <span class="ruby-ivar">@time</span>.<span class="ruby-identifier">to_i</span> <span class="ruby-operator">%</span> <span class="ruby-identifier">val</span>
|
916
|
+
117: <span class="ruby-keyword kw">end</span></pre>
|
917
|
+
</div>
|
918
|
+
|
919
|
+
</div>
|
920
|
+
|
921
|
+
|
922
|
+
|
923
|
+
|
924
|
+
</div>
|
925
|
+
|
926
|
+
|
927
|
+
<div id="--method" class="method-detail ">
|
928
|
+
<a name="M001409"></a>
|
929
|
+
|
930
|
+
<div class="method-heading">
|
931
|
+
|
932
|
+
<span class="method-name">+</span><span
|
933
|
+
class="method-args">(secs)</span>
|
934
|
+
<span class="method-click-advice">click to toggle source</span>
|
935
|
+
|
936
|
+
</div>
|
937
|
+
|
938
|
+
<div class="method-description">
|
939
|
+
|
940
|
+
<p>
|
941
|
+
Add <em>secs</em> number of seconds to the time.
|
942
|
+
</p>
|
943
|
+
|
944
|
+
|
945
|
+
|
946
|
+
<div class="method-source-code"
|
947
|
+
id="--source">
|
948
|
+
<pre>
|
949
|
+
<span class="ruby-comment cmt"># File lib/TjTime.rb, line 100</span>
|
950
|
+
100: <span class="ruby-keyword kw">def</span> <span class="ruby-operator">+</span>(<span class="ruby-identifier">secs</span>)
|
951
|
+
101: <span class="ruby-constant">TjTime</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@time</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">secs</span>)
|
952
|
+
102: <span class="ruby-keyword kw">end</span></pre>
|
953
|
+
</div>
|
954
|
+
|
955
|
+
</div>
|
956
|
+
|
957
|
+
|
958
|
+
|
959
|
+
|
960
|
+
</div>
|
961
|
+
|
962
|
+
|
963
|
+
<div id="--method" class="method-detail ">
|
964
|
+
<a name="M001410"></a>
|
965
|
+
|
966
|
+
<div class="method-heading">
|
967
|
+
|
968
|
+
<span class="method-name">-</span><span
|
969
|
+
class="method-args">(arg)</span>
|
970
|
+
<span class="method-click-advice">click to toggle source</span>
|
971
|
+
|
972
|
+
</div>
|
973
|
+
|
974
|
+
<div class="method-description">
|
975
|
+
|
976
|
+
<p>
|
977
|
+
Substract <em>arg</em> number of seconds or return the number of seconds
|
978
|
+
between <em>arg</em> and this time.
|
979
|
+
</p>
|
980
|
+
|
981
|
+
|
982
|
+
|
983
|
+
<div class="method-source-code"
|
984
|
+
id="--source">
|
985
|
+
<pre>
|
986
|
+
<span class="ruby-comment cmt"># File lib/TjTime.rb, line 106</span>
|
987
|
+
106: <span class="ruby-keyword kw">def</span> <span class="ruby-operator">-</span>(<span class="ruby-identifier">arg</span>)
|
988
|
+
107: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">arg</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">TjTime</span>)
|
989
|
+
108: <span class="ruby-ivar">@time</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">arg</span>.<span class="ruby-identifier">time</span>
|
990
|
+
109: <span class="ruby-keyword kw">else</span>
|
991
|
+
110: <span class="ruby-constant">TjTime</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@time</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">arg</span>)
|
992
|
+
111: <span class="ruby-keyword kw">end</span>
|
993
|
+
112: <span class="ruby-keyword kw">end</span></pre>
|
994
|
+
</div>
|
995
|
+
|
996
|
+
</div>
|
997
|
+
|
998
|
+
|
999
|
+
|
1000
|
+
|
1001
|
+
</div>
|
1002
|
+
|
1003
|
+
|
1004
|
+
<div id="--method" class="method-detail ">
|
1005
|
+
<a name="M001412"></a>
|
1006
|
+
|
1007
|
+
<div class="method-heading">
|
1008
|
+
|
1009
|
+
<span class="method-name"><</span><span
|
1010
|
+
class="method-args">(t)</span>
|
1011
|
+
<span class="method-click-advice">click to toggle source</span>
|
1012
|
+
|
1013
|
+
</div>
|
1014
|
+
|
1015
|
+
<div class="method-description">
|
1016
|
+
|
1017
|
+
<p>
|
1018
|
+
Return true if time is smaller than <em>t</em>.
|
1019
|
+
</p>
|
1020
|
+
|
1021
|
+
|
1022
|
+
|
1023
|
+
<div class="method-source-code"
|
1024
|
+
id="--source">
|
1025
|
+
<pre>
|
1026
|
+
<span class="ruby-comment cmt"># File lib/TjTime.rb, line 120</span>
|
1027
|
+
120: <span class="ruby-keyword kw">def</span> <span class="ruby-operator"><</span>(<span class="ruby-identifier">t</span>)
|
1028
|
+
121: <span class="ruby-ivar">@time</span> <span class="ruby-operator"><</span> <span class="ruby-identifier">t</span>.<span class="ruby-identifier">time</span>
|
1029
|
+
122: <span class="ruby-keyword kw">end</span></pre>
|
1030
|
+
</div>
|
1031
|
+
|
1032
|
+
</div>
|
1033
|
+
|
1034
|
+
|
1035
|
+
|
1036
|
+
|
1037
|
+
</div>
|
1038
|
+
|
1039
|
+
|
1040
|
+
<div id="--method" class="method-detail ">
|
1041
|
+
<a name="M001413"></a>
|
1042
|
+
|
1043
|
+
<div class="method-heading">
|
1044
|
+
|
1045
|
+
<span class="method-name"><=</span><span
|
1046
|
+
class="method-args">(t)</span>
|
1047
|
+
<span class="method-click-advice">click to toggle source</span>
|
1048
|
+
|
1049
|
+
</div>
|
1050
|
+
|
1051
|
+
<div class="method-description">
|
1052
|
+
|
1053
|
+
<p>
|
1054
|
+
Return true if time is smaller or equal than <em>t</em>.
|
1055
|
+
</p>
|
1056
|
+
|
1057
|
+
|
1058
|
+
|
1059
|
+
<div class="method-source-code"
|
1060
|
+
id="--source">
|
1061
|
+
<pre>
|
1062
|
+
<span class="ruby-comment cmt"># File lib/TjTime.rb, line 125</span>
|
1063
|
+
125: <span class="ruby-keyword kw">def</span> <span class="ruby-operator"><=</span>(<span class="ruby-identifier">t</span>)
|
1064
|
+
126: <span class="ruby-ivar">@time</span> <span class="ruby-operator"><=</span> <span class="ruby-identifier">t</span>.<span class="ruby-identifier">time</span>
|
1065
|
+
127: <span class="ruby-keyword kw">end</span></pre>
|
1066
|
+
</div>
|
1067
|
+
|
1068
|
+
</div>
|
1069
|
+
|
1070
|
+
|
1071
|
+
|
1072
|
+
|
1073
|
+
</div>
|
1074
|
+
|
1075
|
+
|
1076
|
+
<div id="--method" class="method-detail ">
|
1077
|
+
<a name="M001417"></a>
|
1078
|
+
|
1079
|
+
<div class="method-heading">
|
1080
|
+
|
1081
|
+
<span class="method-name"><=></span><span
|
1082
|
+
class="method-args">(t)</span>
|
1083
|
+
<span class="method-click-advice">click to toggle source</span>
|
1084
|
+
|
1085
|
+
</div>
|
1086
|
+
|
1087
|
+
<div class="method-description">
|
1088
|
+
|
1089
|
+
<p>
|
1090
|
+
Coparison operator for time with another time <em>t</em>.
|
1091
|
+
</p>
|
1092
|
+
|
1093
|
+
|
1094
|
+
|
1095
|
+
<div class="method-source-code"
|
1096
|
+
id="--source">
|
1097
|
+
<pre>
|
1098
|
+
<span class="ruby-comment cmt"># File lib/TjTime.rb, line 146</span>
|
1099
|
+
146: <span class="ruby-keyword kw">def</span> <span class="ruby-operator"><=></span>(<span class="ruby-identifier">t</span>)
|
1100
|
+
147: <span class="ruby-ivar">@time</span> <span class="ruby-operator"><=></span> <span class="ruby-identifier">t</span>.<span class="ruby-identifier">time</span>
|
1101
|
+
148: <span class="ruby-keyword kw">end</span></pre>
|
1102
|
+
</div>
|
1103
|
+
|
1104
|
+
</div>
|
1105
|
+
|
1106
|
+
|
1107
|
+
|
1108
|
+
|
1109
|
+
</div>
|
1110
|
+
|
1111
|
+
|
1112
|
+
<div id="--method" class="method-detail ">
|
1113
|
+
<a name="M001416"></a>
|
1114
|
+
|
1115
|
+
<div class="method-heading">
|
1116
|
+
|
1117
|
+
<span class="method-name">==</span><span
|
1118
|
+
class="method-args">(t)</span>
|
1119
|
+
<span class="method-click-advice">click to toggle source</span>
|
1120
|
+
|
1121
|
+
</div>
|
1122
|
+
|
1123
|
+
<div class="method-description">
|
1124
|
+
|
1125
|
+
<p>
|
1126
|
+
Return true if time and <em>t</em> are identical.
|
1127
|
+
</p>
|
1128
|
+
|
1129
|
+
|
1130
|
+
|
1131
|
+
<div class="method-source-code"
|
1132
|
+
id="--source">
|
1133
|
+
<pre>
|
1134
|
+
<span class="ruby-comment cmt"># File lib/TjTime.rb, line 140</span>
|
1135
|
+
140: <span class="ruby-keyword kw">def</span> <span class="ruby-operator">==</span>(<span class="ruby-identifier">t</span>)
|
1136
|
+
141: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">t</span>.<span class="ruby-identifier">nil?</span>
|
1137
|
+
142: <span class="ruby-ivar">@time</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">t</span>.<span class="ruby-identifier">time</span>
|
1138
|
+
143: <span class="ruby-keyword kw">end</span></pre>
|
1139
|
+
</div>
|
1140
|
+
|
1141
|
+
</div>
|
1142
|
+
|
1143
|
+
|
1144
|
+
|
1145
|
+
|
1146
|
+
</div>
|
1147
|
+
|
1148
|
+
|
1149
|
+
<div id="--method" class="method-detail ">
|
1150
|
+
<a name="M001414"></a>
|
1151
|
+
|
1152
|
+
<div class="method-heading">
|
1153
|
+
|
1154
|
+
<span class="method-name">></span><span
|
1155
|
+
class="method-args">(t)</span>
|
1156
|
+
<span class="method-click-advice">click to toggle source</span>
|
1157
|
+
|
1158
|
+
</div>
|
1159
|
+
|
1160
|
+
<div class="method-description">
|
1161
|
+
|
1162
|
+
<p>
|
1163
|
+
Return true if time is larger than <em>t</em>.
|
1164
|
+
</p>
|
1165
|
+
|
1166
|
+
|
1167
|
+
|
1168
|
+
<div class="method-source-code"
|
1169
|
+
id="--source">
|
1170
|
+
<pre>
|
1171
|
+
<span class="ruby-comment cmt"># File lib/TjTime.rb, line 130</span>
|
1172
|
+
130: <span class="ruby-keyword kw">def</span> <span class="ruby-operator">></span>(<span class="ruby-identifier">t</span>)
|
1173
|
+
131: <span class="ruby-ivar">@time</span> <span class="ruby-operator">></span> <span class="ruby-identifier">t</span>.<span class="ruby-identifier">time</span>
|
1174
|
+
132: <span class="ruby-keyword kw">end</span></pre>
|
1175
|
+
</div>
|
1176
|
+
|
1177
|
+
</div>
|
1178
|
+
|
1179
|
+
|
1180
|
+
|
1181
|
+
|
1182
|
+
</div>
|
1183
|
+
|
1184
|
+
|
1185
|
+
<div id="--method" class="method-detail ">
|
1186
|
+
<a name="M001415"></a>
|
1187
|
+
|
1188
|
+
<div class="method-heading">
|
1189
|
+
|
1190
|
+
<span class="method-name">>=</span><span
|
1191
|
+
class="method-args">(t)</span>
|
1192
|
+
<span class="method-click-advice">click to toggle source</span>
|
1193
|
+
|
1194
|
+
</div>
|
1195
|
+
|
1196
|
+
<div class="method-description">
|
1197
|
+
|
1198
|
+
<p>
|
1199
|
+
Return true if time is larger or equal than <em>t</em>.
|
1200
|
+
</p>
|
1201
|
+
|
1202
|
+
|
1203
|
+
|
1204
|
+
<div class="method-source-code"
|
1205
|
+
id="--source">
|
1206
|
+
<pre>
|
1207
|
+
<span class="ruby-comment cmt"># File lib/TjTime.rb, line 135</span>
|
1208
|
+
135: <span class="ruby-keyword kw">def</span> <span class="ruby-operator">>=</span>(<span class="ruby-identifier">t</span>)
|
1209
|
+
136: <span class="ruby-ivar">@time</span> <span class="ruby-operator">>=</span> <span class="ruby-identifier">t</span>.<span class="ruby-identifier">time</span>
|
1210
|
+
137: <span class="ruby-keyword kw">end</span></pre>
|
1211
|
+
</div>
|
1212
|
+
|
1213
|
+
</div>
|
1214
|
+
|
1215
|
+
|
1216
|
+
|
1217
|
+
|
1218
|
+
</div>
|
1219
|
+
|
1220
|
+
|
1221
|
+
<div id="align-method" class="method-detail ">
|
1222
|
+
<a name="M001407"></a>
|
1223
|
+
|
1224
|
+
<div class="method-heading">
|
1225
|
+
|
1226
|
+
<span class="method-name">align</span><span
|
1227
|
+
class="method-args">(clock)</span>
|
1228
|
+
<span class="method-click-advice">click to toggle source</span>
|
1229
|
+
|
1230
|
+
</div>
|
1231
|
+
|
1232
|
+
<div class="method-description">
|
1233
|
+
|
1234
|
+
<p>
|
1235
|
+
Align the date to a time grid. The grid distance is determined by
|
1236
|
+
<em>clock</em>.
|
1237
|
+
</p>
|
1238
|
+
|
1239
|
+
|
1240
|
+
|
1241
|
+
<div class="method-source-code"
|
1242
|
+
id="align-source">
|
1243
|
+
<pre>
|
1244
|
+
<span class="ruby-comment cmt"># File lib/TjTime.rb, line 88</span>
|
1245
|
+
88: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">align</span>(<span class="ruby-identifier">clock</span>)
|
1246
|
+
89: <span class="ruby-constant">TjTime</span>.<span class="ruby-identifier">new</span>((<span class="ruby-ivar">@time</span>.<span class="ruby-identifier">to_i</span> <span class="ruby-operator">/</span> <span class="ruby-identifier">clock</span>) * <span class="ruby-identifier">clock</span>)
|
1247
|
+
90: <span class="ruby-keyword kw">end</span></pre>
|
1248
|
+
</div>
|
1249
|
+
|
1250
|
+
</div>
|
1251
|
+
|
1252
|
+
|
1253
|
+
|
1254
|
+
|
1255
|
+
</div>
|
1256
|
+
|
1257
|
+
|
1258
|
+
<div id="begin-f-our-method" class="method-detail ">
|
1259
|
+
<a name="M001419"></a>
|
1260
|
+
|
1261
|
+
<div class="method-heading">
|
1262
|
+
|
1263
|
+
<span class="method-name">beginOfHour</span><span
|
1264
|
+
class="method-args">()</span>
|
1265
|
+
<span class="method-click-advice">click to toggle source</span>
|
1266
|
+
|
1267
|
+
</div>
|
1268
|
+
|
1269
|
+
<div class="method-description">
|
1270
|
+
|
1271
|
+
<p>
|
1272
|
+
Normalize time to the beginning of the current hour.
|
1273
|
+
</p>
|
1274
|
+
|
1275
|
+
|
1276
|
+
|
1277
|
+
<div class="method-source-code"
|
1278
|
+
id="begin-f-our-source">
|
1279
|
+
<pre>
|
1280
|
+
<span class="ruby-comment cmt"># File lib/TjTime.rb, line 161</span>
|
1281
|
+
161: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">beginOfHour</span>
|
1282
|
+
162: <span class="ruby-identifier">t</span> = <span class="ruby-ivar">@time</span>.<span class="ruby-identifier">localtime</span>.<span class="ruby-identifier">to_a</span>
|
1283
|
+
163: <span class="ruby-identifier">t</span>[<span class="ruby-value">0</span>, <span class="ruby-value">2</span>] = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">2</span>, <span class="ruby-value">0</span>)
|
1284
|
+
164: <span class="ruby-identifier">t</span>.<span class="ruby-identifier">slice!</span>(<span class="ruby-value">6</span>, <span class="ruby-value">4</span>)
|
1285
|
+
165: <span class="ruby-identifier">t</span>.<span class="ruby-identifier">reverse!</span>
|
1286
|
+
166: <span class="ruby-constant">TjTime</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">Time</span>.<span class="ruby-identifier">local</span>(*<span class="ruby-identifier">t</span>))
|
1287
|
+
167: <span class="ruby-keyword kw">end</span></pre>
|
1288
|
+
</div>
|
1289
|
+
|
1290
|
+
</div>
|
1291
|
+
|
1292
|
+
|
1293
|
+
|
1294
|
+
|
1295
|
+
</div>
|
1296
|
+
|
1297
|
+
|
1298
|
+
<div id="begin-f-onth-method" class="method-detail ">
|
1299
|
+
<a name="M001422"></a>
|
1300
|
+
|
1301
|
+
<div class="method-heading">
|
1302
|
+
|
1303
|
+
<span class="method-name">beginOfMonth</span><span
|
1304
|
+
class="method-args">()</span>
|
1305
|
+
<span class="method-click-advice">click to toggle source</span>
|
1306
|
+
|
1307
|
+
</div>
|
1308
|
+
|
1309
|
+
<div class="method-description">
|
1310
|
+
|
1311
|
+
<p>
|
1312
|
+
Normalize time to the beginning of the current month.
|
1313
|
+
</p>
|
1314
|
+
|
1315
|
+
|
1316
|
+
|
1317
|
+
<div class="method-source-code"
|
1318
|
+
id="begin-f-onth-source">
|
1319
|
+
<pre>
|
1320
|
+
<span class="ruby-comment cmt"># File lib/TjTime.rb, line 194</span>
|
1321
|
+
194: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">beginOfMonth</span>
|
1322
|
+
195: <span class="ruby-identifier">t</span> = <span class="ruby-ivar">@time</span>.<span class="ruby-identifier">localtime</span>.<span class="ruby-identifier">to_a</span>
|
1323
|
+
196: <span class="ruby-identifier">t</span>[<span class="ruby-value">0</span>, <span class="ruby-value">3</span>] = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">3</span>, <span class="ruby-value">0</span>)
|
1324
|
+
197: <span class="ruby-identifier">t</span>[<span class="ruby-value">3</span>] = <span class="ruby-value">1</span>
|
1325
|
+
198: <span class="ruby-identifier">t</span>.<span class="ruby-identifier">slice!</span>(<span class="ruby-value">6</span>, <span class="ruby-value">4</span>)
|
1326
|
+
199: <span class="ruby-identifier">t</span>.<span class="ruby-identifier">reverse!</span>
|
1327
|
+
200: <span class="ruby-constant">TjTime</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">Time</span>.<span class="ruby-identifier">local</span>(*<span class="ruby-identifier">t</span>))
|
1328
|
+
201: <span class="ruby-keyword kw">end</span></pre>
|
1329
|
+
</div>
|
1330
|
+
|
1331
|
+
</div>
|
1332
|
+
|
1333
|
+
|
1334
|
+
|
1335
|
+
|
1336
|
+
</div>
|
1337
|
+
|
1338
|
+
|
1339
|
+
<div id="begin-f-uarter-method" class="method-detail ">
|
1340
|
+
<a name="M001423"></a>
|
1341
|
+
|
1342
|
+
<div class="method-heading">
|
1343
|
+
|
1344
|
+
<span class="method-name">beginOfQuarter</span><span
|
1345
|
+
class="method-args">()</span>
|
1346
|
+
<span class="method-click-advice">click to toggle source</span>
|
1347
|
+
|
1348
|
+
</div>
|
1349
|
+
|
1350
|
+
<div class="method-description">
|
1351
|
+
|
1352
|
+
<p>
|
1353
|
+
Normalize time to the beginning of the current quarter.
|
1354
|
+
</p>
|
1355
|
+
|
1356
|
+
|
1357
|
+
|
1358
|
+
<div class="method-source-code"
|
1359
|
+
id="begin-f-uarter-source">
|
1360
|
+
<pre>
|
1361
|
+
<span class="ruby-comment cmt"># File lib/TjTime.rb, line 204</span>
|
1362
|
+
204: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">beginOfQuarter</span>
|
1363
|
+
205: <span class="ruby-identifier">t</span> = <span class="ruby-ivar">@time</span>.<span class="ruby-identifier">localtime</span>.<span class="ruby-identifier">to_a</span>
|
1364
|
+
206: <span class="ruby-identifier">t</span>[<span class="ruby-value">0</span>, <span class="ruby-value">3</span>] = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">3</span>, <span class="ruby-value">0</span>)
|
1365
|
+
207: <span class="ruby-identifier">t</span>[<span class="ruby-value">3</span>] = <span class="ruby-value">1</span>
|
1366
|
+
208: <span class="ruby-identifier">t</span>[<span class="ruby-value">4</span>] = ((<span class="ruby-identifier">t</span>[<span class="ruby-value">4</span>] <span class="ruby-operator">-</span> <span class="ruby-value">1</span>) <span class="ruby-operator">%</span> <span class="ruby-value">3</span>) <span class="ruby-operator">+</span> <span class="ruby-value">1</span>
|
1367
|
+
209: <span class="ruby-identifier">t</span>.<span class="ruby-identifier">slice!</span>(<span class="ruby-value">6</span>, <span class="ruby-value">4</span>)
|
1368
|
+
210: <span class="ruby-identifier">t</span>.<span class="ruby-identifier">reverse!</span>
|
1369
|
+
211: <span class="ruby-constant">TjTime</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">Time</span>.<span class="ruby-identifier">local</span>(*<span class="ruby-identifier">t</span>))
|
1370
|
+
212: <span class="ruby-keyword kw">end</span></pre>
|
1371
|
+
</div>
|
1372
|
+
|
1373
|
+
</div>
|
1374
|
+
|
1375
|
+
|
1376
|
+
|
1377
|
+
|
1378
|
+
</div>
|
1379
|
+
|
1380
|
+
|
1381
|
+
<div id="begin-f-eek-method" class="method-detail ">
|
1382
|
+
<a name="M001421"></a>
|
1383
|
+
|
1384
|
+
<div class="method-heading">
|
1385
|
+
|
1386
|
+
<span class="method-name">beginOfWeek</span><span
|
1387
|
+
class="method-args">(startMonday)</span>
|
1388
|
+
<span class="method-click-advice">click to toggle source</span>
|
1389
|
+
|
1390
|
+
</div>
|
1391
|
+
|
1392
|
+
<div class="method-description">
|
1393
|
+
|
1394
|
+
<p>
|
1395
|
+
Normalize time to the beginning of the current week. <em>startMonday</em>
|
1396
|
+
determines whether the week should start on Monday or Sunday.
|
1397
|
+
</p>
|
1398
|
+
|
1399
|
+
|
1400
|
+
|
1401
|
+
<div class="method-source-code"
|
1402
|
+
id="begin-f-eek-source">
|
1403
|
+
<pre>
|
1404
|
+
<span class="ruby-comment cmt"># File lib/TjTime.rb, line 180</span>
|
1405
|
+
180: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">beginOfWeek</span>(<span class="ruby-identifier">startMonday</span>)
|
1406
|
+
181: <span class="ruby-identifier">t</span> = <span class="ruby-ivar">@time</span>.<span class="ruby-identifier">to_a</span>
|
1407
|
+
182: <span class="ruby-comment cmt"># Set time to noon, 12:00:00</span>
|
1408
|
+
183: <span class="ruby-identifier">t</span>[<span class="ruby-value">0</span>, <span class="ruby-value">3</span>] = [ <span class="ruby-value">0</span>, <span class="ruby-value">0</span>, <span class="ruby-value">12</span> ]
|
1409
|
+
184: <span class="ruby-identifier">weekday</span> = <span class="ruby-identifier">t</span>[<span class="ruby-value">6</span>]
|
1410
|
+
185: <span class="ruby-identifier">t</span>.<span class="ruby-identifier">slice!</span>(<span class="ruby-value">6</span>, <span class="ruby-value">4</span>)
|
1411
|
+
186: <span class="ruby-identifier">t</span>.<span class="ruby-identifier">reverse!</span>
|
1412
|
+
187: <span class="ruby-comment cmt"># Substract the number of days determined by the weekday t[6] and set time</span>
|
1413
|
+
188: <span class="ruby-comment cmt"># to midnight of that day.</span>
|
1414
|
+
189: (<span class="ruby-constant">TjTime</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">Time</span>.<span class="ruby-identifier">local</span>(*<span class="ruby-identifier">t</span>)) <span class="ruby-operator">-</span>
|
1415
|
+
190: (<span class="ruby-identifier">weekday</span> <span class="ruby-operator">-</span> (<span class="ruby-identifier">startMonday</span> <span class="ruby-operator">?</span> <span class="ruby-value">1</span> <span class="ruby-operator">:</span> <span class="ruby-value">0</span>)) * <span class="ruby-value">60</span> * <span class="ruby-value">60</span> * <span class="ruby-value">24</span>).<span class="ruby-identifier">midnight</span>
|
1416
|
+
191: <span class="ruby-keyword kw">end</span></pre>
|
1417
|
+
</div>
|
1418
|
+
|
1419
|
+
</div>
|
1420
|
+
|
1421
|
+
|
1422
|
+
|
1423
|
+
|
1424
|
+
</div>
|
1425
|
+
|
1426
|
+
|
1427
|
+
<div id="begin-f-ear-method" class="method-detail ">
|
1428
|
+
<a name="M001424"></a>
|
1429
|
+
|
1430
|
+
<div class="method-heading">
|
1431
|
+
|
1432
|
+
<span class="method-name">beginOfYear</span><span
|
1433
|
+
class="method-args">()</span>
|
1434
|
+
<span class="method-click-advice">click to toggle source</span>
|
1435
|
+
|
1436
|
+
</div>
|
1437
|
+
|
1438
|
+
<div class="method-description">
|
1439
|
+
|
1440
|
+
<p>
|
1441
|
+
Normalize time to the beginning of the current year.
|
1442
|
+
</p>
|
1443
|
+
|
1444
|
+
|
1445
|
+
|
1446
|
+
<div class="method-source-code"
|
1447
|
+
id="begin-f-ear-source">
|
1448
|
+
<pre>
|
1449
|
+
<span class="ruby-comment cmt"># File lib/TjTime.rb, line 215</span>
|
1450
|
+
215: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">beginOfYear</span>
|
1451
|
+
216: <span class="ruby-identifier">t</span> = <span class="ruby-ivar">@time</span>.<span class="ruby-identifier">localtime</span>.<span class="ruby-identifier">to_a</span>
|
1452
|
+
217: <span class="ruby-identifier">t</span>[<span class="ruby-value">0</span>, <span class="ruby-value">3</span>] = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">3</span>, <span class="ruby-value">0</span>)
|
1453
|
+
218: <span class="ruby-identifier">t</span>[<span class="ruby-value">3</span>, <span class="ruby-value">2</span>] = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">2</span>, <span class="ruby-value">1</span>)
|
1454
|
+
219: <span class="ruby-identifier">t</span>.<span class="ruby-identifier">slice!</span>(<span class="ruby-value">6</span>, <span class="ruby-value">4</span>)
|
1455
|
+
220: <span class="ruby-identifier">t</span>.<span class="ruby-identifier">reverse!</span>
|
1456
|
+
221: <span class="ruby-constant">TjTime</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">Time</span>.<span class="ruby-identifier">local</span>(*<span class="ruby-identifier">t</span>))
|
1457
|
+
222: <span class="ruby-keyword kw">end</span></pre>
|
1458
|
+
</div>
|
1459
|
+
|
1460
|
+
</div>
|
1461
|
+
|
1462
|
+
|
1463
|
+
|
1464
|
+
|
1465
|
+
</div>
|
1466
|
+
|
1467
|
+
|
1468
|
+
<div id="days-o-method" class="method-detail ">
|
1469
|
+
<a name="M001433"></a>
|
1470
|
+
|
1471
|
+
<div class="method-heading">
|
1472
|
+
|
1473
|
+
<span class="method-name">daysTo</span><span
|
1474
|
+
class="method-args">(date)</span>
|
1475
|
+
<span class="method-click-advice">click to toggle source</span>
|
1476
|
+
|
1477
|
+
</div>
|
1478
|
+
|
1479
|
+
<div class="method-description">
|
1480
|
+
|
1481
|
+
<p>
|
1482
|
+
Return the number of days between this time and <em>date</em>. The result
|
1483
|
+
is always rounded up.
|
1484
|
+
</p>
|
1485
|
+
|
1486
|
+
|
1487
|
+
|
1488
|
+
<div class="method-source-code"
|
1489
|
+
id="days-o-source">
|
1490
|
+
<pre>
|
1491
|
+
<span class="ruby-comment cmt"># File lib/TjTime.rb, line 307</span>
|
1492
|
+
307: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">daysTo</span>(<span class="ruby-identifier">date</span>)
|
1493
|
+
308: <span class="ruby-identifier">countIntervals</span>(<span class="ruby-identifier">date</span>, <span class="ruby-value">:sameTimeNextDay</span>)
|
1494
|
+
309: <span class="ruby-keyword kw">end</span></pre>
|
1495
|
+
</div>
|
1496
|
+
|
1497
|
+
</div>
|
1498
|
+
|
1499
|
+
|
1500
|
+
|
1501
|
+
|
1502
|
+
</div>
|
1503
|
+
|
1504
|
+
|
1505
|
+
<div id="hours-ater-method" class="method-detail ">
|
1506
|
+
<a name="M001425"></a>
|
1507
|
+
|
1508
|
+
<div class="method-heading">
|
1509
|
+
|
1510
|
+
<span class="method-name">hoursLater</span><span
|
1511
|
+
class="method-args">(hours)</span>
|
1512
|
+
<span class="method-click-advice">click to toggle source</span>
|
1513
|
+
|
1514
|
+
</div>
|
1515
|
+
|
1516
|
+
<div class="method-description">
|
1517
|
+
|
1518
|
+
<p>
|
1519
|
+
Return a new time that is <em>hours</em> later than time.
|
1520
|
+
</p>
|
1521
|
+
|
1522
|
+
|
1523
|
+
|
1524
|
+
<div class="method-source-code"
|
1525
|
+
id="hours-ater-source">
|
1526
|
+
<pre>
|
1527
|
+
<span class="ruby-comment cmt"># File lib/TjTime.rb, line 225</span>
|
1528
|
+
225: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">hoursLater</span>(<span class="ruby-identifier">hours</span>)
|
1529
|
+
226: <span class="ruby-constant">TjTime</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@time</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">hours</span> * <span class="ruby-value">3600</span>)
|
1530
|
+
227: <span class="ruby-keyword kw">end</span></pre>
|
1531
|
+
</div>
|
1532
|
+
|
1533
|
+
</div>
|
1534
|
+
|
1535
|
+
|
1536
|
+
|
1537
|
+
|
1538
|
+
</div>
|
1539
|
+
|
1540
|
+
|
1541
|
+
<div id="hours-o-method" class="method-detail ">
|
1542
|
+
<a name="M001432"></a>
|
1543
|
+
|
1544
|
+
<div class="method-heading">
|
1545
|
+
|
1546
|
+
<span class="method-name">hoursTo</span><span
|
1547
|
+
class="method-args">(date)</span>
|
1548
|
+
<span class="method-click-advice">click to toggle source</span>
|
1549
|
+
|
1550
|
+
</div>
|
1551
|
+
|
1552
|
+
<div class="method-description">
|
1553
|
+
|
1554
|
+
<p>
|
1555
|
+
Return the number of hours between this time and <em>date</em>. The result
|
1556
|
+
is always rounded up.
|
1557
|
+
</p>
|
1558
|
+
|
1559
|
+
|
1560
|
+
|
1561
|
+
<div class="method-source-code"
|
1562
|
+
id="hours-o-source">
|
1563
|
+
<pre>
|
1564
|
+
<span class="ruby-comment cmt"># File lib/TjTime.rb, line 300</span>
|
1565
|
+
300: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">hoursTo</span>(<span class="ruby-identifier">date</span>)
|
1566
|
+
301: <span class="ruby-identifier">t1</span>, <span class="ruby-identifier">t2</span> = <span class="ruby-identifier">order</span>(<span class="ruby-identifier">date</span>)
|
1567
|
+
302: ((<span class="ruby-identifier">t2</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">t1</span>) <span class="ruby-operator">/</span> <span class="ruby-value">3600</span>).<span class="ruby-identifier">ceil</span>
|
1568
|
+
303: <span class="ruby-keyword kw">end</span></pre>
|
1569
|
+
</div>
|
1570
|
+
|
1571
|
+
</div>
|
1572
|
+
|
1573
|
+
|
1574
|
+
|
1575
|
+
|
1576
|
+
</div>
|
1577
|
+
|
1578
|
+
|
1579
|
+
<div id="method-missing-method" class="method-detail ">
|
1580
|
+
<a name="M001446"></a>
|
1581
|
+
|
1582
|
+
<div class="method-heading">
|
1583
|
+
|
1584
|
+
<span class="method-name">method_missing</span><span
|
1585
|
+
class="method-args">(func, *args)</span>
|
1586
|
+
<span class="method-click-advice">click to toggle source</span>
|
1587
|
+
|
1588
|
+
</div>
|
1589
|
+
|
1590
|
+
<div class="method-description">
|
1591
|
+
|
1592
|
+
<p>
|
1593
|
+
Pass any unknown function directoy to the @time variable.
|
1594
|
+
</p>
|
1595
|
+
|
1596
|
+
|
1597
|
+
|
1598
|
+
<div class="method-source-code"
|
1599
|
+
id="method-missing-source">
|
1600
|
+
<pre>
|
1601
|
+
<span class="ruby-comment cmt"># File lib/TjTime.rb, line 391</span>
|
1602
|
+
391: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">method_missing</span>(<span class="ruby-identifier">func</span>, *<span class="ruby-identifier">args</span>)
|
1603
|
+
392: <span class="ruby-ivar">@time</span>.<span class="ruby-identifier">method</span>(<span class="ruby-identifier">func</span>).<span class="ruby-identifier">call</span>(*<span class="ruby-identifier">args</span>)
|
1604
|
+
393: <span class="ruby-keyword kw">end</span></pre>
|
1605
|
+
</div>
|
1606
|
+
|
1607
|
+
</div>
|
1608
|
+
|
1609
|
+
|
1610
|
+
|
1611
|
+
|
1612
|
+
</div>
|
1613
|
+
|
1614
|
+
|
1615
|
+
<div id="midnight-method" class="method-detail ">
|
1616
|
+
<a name="M001420"></a>
|
1617
|
+
|
1618
|
+
<div class="method-heading">
|
1619
|
+
|
1620
|
+
<span class="method-name">midnight</span><span
|
1621
|
+
class="method-args">()</span>
|
1622
|
+
<span class="method-click-advice">click to toggle source</span>
|
1623
|
+
|
1624
|
+
</div>
|
1625
|
+
|
1626
|
+
<div class="method-description">
|
1627
|
+
|
1628
|
+
<p>
|
1629
|
+
Normalize time to the beginning of the current day.
|
1630
|
+
</p>
|
1631
|
+
|
1632
|
+
|
1633
|
+
|
1634
|
+
<div class="method-source-code"
|
1635
|
+
id="midnight-source">
|
1636
|
+
<pre>
|
1637
|
+
<span class="ruby-comment cmt"># File lib/TjTime.rb, line 170</span>
|
1638
|
+
170: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">midnight</span>
|
1639
|
+
171: <span class="ruby-identifier">t</span> = <span class="ruby-ivar">@time</span>.<span class="ruby-identifier">localtime</span>.<span class="ruby-identifier">to_a</span>
|
1640
|
+
172: <span class="ruby-identifier">t</span>[<span class="ruby-value">0</span>, <span class="ruby-value">3</span>] = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">3</span>, <span class="ruby-value">0</span>)
|
1641
|
+
173: <span class="ruby-identifier">t</span>.<span class="ruby-identifier">slice!</span>(<span class="ruby-value">6</span>, <span class="ruby-value">4</span>)
|
1642
|
+
174: <span class="ruby-identifier">t</span>.<span class="ruby-identifier">reverse!</span>
|
1643
|
+
175: <span class="ruby-constant">TjTime</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">Time</span>.<span class="ruby-identifier">local</span>(*<span class="ruby-identifier">t</span>))
|
1644
|
+
176: <span class="ruby-keyword kw">end</span></pre>
|
1645
|
+
</div>
|
1646
|
+
|
1647
|
+
</div>
|
1648
|
+
|
1649
|
+
|
1650
|
+
|
1651
|
+
|
1652
|
+
</div>
|
1653
|
+
|
1654
|
+
|
1655
|
+
<div id="month-nd-ear-method" class="method-detail ">
|
1656
|
+
<a name="M001443"></a>
|
1657
|
+
|
1658
|
+
<div class="method-heading">
|
1659
|
+
|
1660
|
+
<span class="method-name">monthAndYear</span><span
|
1661
|
+
class="method-args">()</span>
|
1662
|
+
<span class="method-click-advice">click to toggle source</span>
|
1663
|
+
|
1664
|
+
</div>
|
1665
|
+
|
1666
|
+
<div class="method-description">
|
1667
|
+
|
1668
|
+
<p>
|
1669
|
+
Return the abbreviated month name and the full year. E. g. ‘Feb
|
1670
|
+
1972’.
|
1671
|
+
</p>
|
1672
|
+
|
1673
|
+
|
1674
|
+
|
1675
|
+
<div class="method-source-code"
|
1676
|
+
id="month-nd-ear-source">
|
1677
|
+
<pre>
|
1678
|
+
<span class="ruby-comment cmt"># File lib/TjTime.rb, line 368</span>
|
1679
|
+
368: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">monthAndYear</span>
|
1680
|
+
369: <span class="ruby-ivar">@time</span>.<span class="ruby-identifier">strftime</span>(<span class="ruby-value str">'%b %Y'</span>)
|
1681
|
+
370: <span class="ruby-keyword kw">end</span></pre>
|
1682
|
+
</div>
|
1683
|
+
|
1684
|
+
</div>
|
1685
|
+
|
1686
|
+
|
1687
|
+
|
1688
|
+
|
1689
|
+
</div>
|
1690
|
+
|
1691
|
+
|
1692
|
+
<div id="months-o-method" class="method-detail ">
|
1693
|
+
<a name="M001435"></a>
|
1694
|
+
|
1695
|
+
<div class="method-heading">
|
1696
|
+
|
1697
|
+
<span class="method-name">monthsTo</span><span
|
1698
|
+
class="method-args">(date)</span>
|
1699
|
+
<span class="method-click-advice">click to toggle source</span>
|
1700
|
+
|
1701
|
+
</div>
|
1702
|
+
|
1703
|
+
<div class="method-description">
|
1704
|
+
|
1705
|
+
<p>
|
1706
|
+
Return the number of months between this time and <em>date</em>. The result
|
1707
|
+
is always rounded up.
|
1708
|
+
</p>
|
1709
|
+
|
1710
|
+
|
1711
|
+
|
1712
|
+
<div class="method-source-code"
|
1713
|
+
id="months-o-source">
|
1714
|
+
<pre>
|
1715
|
+
<span class="ruby-comment cmt"># File lib/TjTime.rb, line 319</span>
|
1716
|
+
319: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">monthsTo</span>(<span class="ruby-identifier">date</span>)
|
1717
|
+
320: <span class="ruby-identifier">countIntervals</span>(<span class="ruby-identifier">date</span>, <span class="ruby-value">:sameTimeNextMonth</span>)
|
1718
|
+
321: <span class="ruby-keyword kw">end</span></pre>
|
1719
|
+
</div>
|
1720
|
+
|
1721
|
+
</div>
|
1722
|
+
|
1723
|
+
|
1724
|
+
|
1725
|
+
|
1726
|
+
</div>
|
1727
|
+
|
1728
|
+
|
1729
|
+
<div id="next-ay-f-eek-method" class="method-detail ">
|
1730
|
+
<a name="M001445"></a>
|
1731
|
+
|
1732
|
+
<div class="method-heading">
|
1733
|
+
|
1734
|
+
<span class="method-name">nextDayOfWeek</span><span
|
1735
|
+
class="method-args">(dow)</span>
|
1736
|
+
<span class="method-click-advice">click to toggle source</span>
|
1737
|
+
|
1738
|
+
</div>
|
1739
|
+
|
1740
|
+
<div class="method-description">
|
1741
|
+
|
1742
|
+
<p>
|
1743
|
+
Return the start of the next <em>dow</em> day of week after <em>date</em>.
|
1744
|
+
<em>dow</em> must be 0 for Sundays, 1 for Mondays and 6 for Saturdays. If
|
1745
|
+
<em>date</em> is a Tuesday and <em>dow</em> is 5 (Friday) the date of next
|
1746
|
+
Friday 0:00 will be returned. If <em>date</em> is a Tuesday and
|
1747
|
+
<em>dow</em> is 2 (Tuesday) the date of the next Tuesday will be returned.
|
1748
|
+
</p>
|
1749
|
+
|
1750
|
+
|
1751
|
+
|
1752
|
+
<div class="method-source-code"
|
1753
|
+
id="next-ay-f-eek-source">
|
1754
|
+
<pre>
|
1755
|
+
<span class="ruby-comment cmt"># File lib/TjTime.rb, line 382</span>
|
1756
|
+
382: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">nextDayOfWeek</span>(<span class="ruby-identifier">dow</span>)
|
1757
|
+
383: <span class="ruby-identifier">raise</span> <span class="ruby-value str">"Day of week must be 0 - 6."</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">dow</span> <span class="ruby-operator">>=</span> <span class="ruby-value">0</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">dow</span> <span class="ruby-operator"><=</span> <span class="ruby-value">6</span>
|
1758
|
+
384: <span class="ruby-identifier">d</span> = <span class="ruby-identifier">midnight</span>.<span class="ruby-identifier">sameTimeNextDay</span>
|
1759
|
+
385: <span class="ruby-identifier">currentDoW</span> = <span class="ruby-identifier">d</span>.<span class="ruby-identifier">strftime</span>(<span class="ruby-value str">'%w'</span>).<span class="ruby-identifier">to_i</span>
|
1760
|
+
386: <span class="ruby-value">1</span>.<span class="ruby-identifier">upto</span>((<span class="ruby-identifier">dow</span> <span class="ruby-operator">+</span> <span class="ruby-value">7</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">currentDoW</span>) <span class="ruby-operator">%</span> <span class="ruby-value">7</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span> <span class="ruby-identifier">d</span> = <span class="ruby-identifier">d</span>.<span class="ruby-identifier">sameTimeNextDay</span> }
|
1761
|
+
387: <span class="ruby-identifier">d</span>
|
1762
|
+
388: <span class="ruby-keyword kw">end</span></pre>
|
1763
|
+
</div>
|
1764
|
+
|
1765
|
+
</div>
|
1766
|
+
|
1767
|
+
|
1768
|
+
|
1769
|
+
|
1770
|
+
</div>
|
1771
|
+
|
1772
|
+
|
1773
|
+
<div id="quarter-ame-method" class="method-detail ">
|
1774
|
+
<a name="M001441"></a>
|
1775
|
+
|
1776
|
+
<div class="method-heading">
|
1777
|
+
|
1778
|
+
<span class="method-name">quarterName</span><span
|
1779
|
+
class="method-args">()</span>
|
1780
|
+
<span class="method-click-advice">click to toggle source</span>
|
1781
|
+
|
1782
|
+
</div>
|
1783
|
+
|
1784
|
+
<div class="method-description">
|
1785
|
+
|
1786
|
+
<p>
|
1787
|
+
Return the number of the quarter prefixed by a ‘Q’.
|
1788
|
+
</p>
|
1789
|
+
|
1790
|
+
|
1791
|
+
|
1792
|
+
<div class="method-source-code"
|
1793
|
+
id="quarter-ame-source">
|
1794
|
+
<pre>
|
1795
|
+
<span class="ruby-comment cmt"># File lib/TjTime.rb, line 357</span>
|
1796
|
+
357: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">quarterName</span>
|
1797
|
+
358: <span class="ruby-node">"Q#{(@time.mon / 3) + 1}"</span>
|
1798
|
+
359: <span class="ruby-keyword kw">end</span></pre>
|
1799
|
+
</div>
|
1800
|
+
|
1801
|
+
</div>
|
1802
|
+
|
1803
|
+
|
1804
|
+
|
1805
|
+
|
1806
|
+
</div>
|
1807
|
+
|
1808
|
+
|
1809
|
+
<div id="quarters-o-method" class="method-detail ">
|
1810
|
+
<a name="M001436"></a>
|
1811
|
+
|
1812
|
+
<div class="method-heading">
|
1813
|
+
|
1814
|
+
<span class="method-name">quartersTo</span><span
|
1815
|
+
class="method-args">(date)</span>
|
1816
|
+
<span class="method-click-advice">click to toggle source</span>
|
1817
|
+
|
1818
|
+
</div>
|
1819
|
+
|
1820
|
+
<div class="method-description">
|
1821
|
+
|
1822
|
+
<p>
|
1823
|
+
Return the number of quarters between this time and <em>date</em>. The
|
1824
|
+
result is always rounded up.
|
1825
|
+
</p>
|
1826
|
+
|
1827
|
+
|
1828
|
+
|
1829
|
+
<div class="method-source-code"
|
1830
|
+
id="quarters-o-source">
|
1831
|
+
<pre>
|
1832
|
+
<span class="ruby-comment cmt"># File lib/TjTime.rb, line 325</span>
|
1833
|
+
325: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">quartersTo</span>(<span class="ruby-identifier">date</span>)
|
1834
|
+
326: <span class="ruby-identifier">countIntervals</span>(<span class="ruby-identifier">date</span>, <span class="ruby-value">:sameTimeNextQuarter</span>)
|
1835
|
+
327: <span class="ruby-keyword kw">end</span></pre>
|
1836
|
+
</div>
|
1837
|
+
|
1838
|
+
</div>
|
1839
|
+
|
1840
|
+
|
1841
|
+
|
1842
|
+
|
1843
|
+
</div>
|
1844
|
+
|
1845
|
+
|
1846
|
+
<div id="same-ime-ext-ay-method" class="method-detail ">
|
1847
|
+
<a name="M001427"></a>
|
1848
|
+
|
1849
|
+
<div class="method-heading">
|
1850
|
+
|
1851
|
+
<span class="method-name">sameTimeNextDay</span><span
|
1852
|
+
class="method-args">()</span>
|
1853
|
+
<span class="method-click-advice">click to toggle source</span>
|
1854
|
+
|
1855
|
+
</div>
|
1856
|
+
|
1857
|
+
<div class="method-description">
|
1858
|
+
|
1859
|
+
<p>
|
1860
|
+
Return a new time that is 1 day later than time but at the same time of
|
1861
|
+
day.
|
1862
|
+
</p>
|
1863
|
+
|
1864
|
+
|
1865
|
+
|
1866
|
+
<div class="method-source-code"
|
1867
|
+
id="same-ime-ext-ay-source">
|
1868
|
+
<pre>
|
1869
|
+
<span class="ruby-comment cmt"># File lib/TjTime.rb, line 236</span>
|
1870
|
+
236: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">sameTimeNextDay</span>
|
1871
|
+
237: <span class="ruby-identifier">delta</span> = [ <span class="ruby-value">0</span>, <span class="ruby-value">1</span>, <span class="ruby-value">1</span> ]
|
1872
|
+
238: <span class="ruby-identifier">localT1</span> = <span class="ruby-ivar">@time</span>.<span class="ruby-identifier">localtime</span>.<span class="ruby-identifier">to_a</span>
|
1873
|
+
239: <span class="ruby-identifier">delta</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">d</span><span class="ruby-operator">|</span>
|
1874
|
+
240: <span class="ruby-identifier">t</span> = <span class="ruby-ivar">@time</span> <span class="ruby-operator">+</span> (<span class="ruby-value">24</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">d</span>) * <span class="ruby-value">60</span> * <span class="ruby-value">60</span>
|
1875
|
+
241: <span class="ruby-identifier">localT2</span> = <span class="ruby-identifier">t</span>.<span class="ruby-identifier">localtime</span>.<span class="ruby-identifier">to_a</span>
|
1876
|
+
242: <span class="ruby-keyword kw">return</span> <span class="ruby-constant">TjTime</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">t</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">localT1</span>[<span class="ruby-value">0</span>, <span class="ruby-value">3</span>] <span class="ruby-operator">==</span> <span class="ruby-identifier">localT2</span>[<span class="ruby-value">0</span>, <span class="ruby-value">3</span>]
|
1877
|
+
243: <span class="ruby-keyword kw">end</span>
|
1878
|
+
244: <span class="ruby-identifier">raise</span> <span class="ruby-node">"Algorithm is broken for #{@time}"</span>
|
1879
|
+
245: <span class="ruby-keyword kw">end</span></pre>
|
1880
|
+
</div>
|
1881
|
+
|
1882
|
+
</div>
|
1883
|
+
|
1884
|
+
|
1885
|
+
|
1886
|
+
|
1887
|
+
</div>
|
1888
|
+
|
1889
|
+
|
1890
|
+
<div id="same-ime-ext-our-method" class="method-detail ">
|
1891
|
+
<a name="M001426"></a>
|
1892
|
+
|
1893
|
+
<div class="method-heading">
|
1894
|
+
|
1895
|
+
<span class="method-name">sameTimeNextHour</span><span
|
1896
|
+
class="method-args">()</span>
|
1897
|
+
<span class="method-click-advice">click to toggle source</span>
|
1898
|
+
|
1899
|
+
</div>
|
1900
|
+
|
1901
|
+
<div class="method-description">
|
1902
|
+
|
1903
|
+
<p>
|
1904
|
+
Return a new time that is 1 hour later than time.
|
1905
|
+
</p>
|
1906
|
+
|
1907
|
+
|
1908
|
+
|
1909
|
+
<div class="method-source-code"
|
1910
|
+
id="same-ime-ext-our-source">
|
1911
|
+
<pre>
|
1912
|
+
<span class="ruby-comment cmt"># File lib/TjTime.rb, line 230</span>
|
1913
|
+
230: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">sameTimeNextHour</span>
|
1914
|
+
231: <span class="ruby-identifier">hoursLater</span>(<span class="ruby-value">1</span>)
|
1915
|
+
232: <span class="ruby-keyword kw">end</span></pre>
|
1916
|
+
</div>
|
1917
|
+
|
1918
|
+
</div>
|
1919
|
+
|
1920
|
+
|
1921
|
+
|
1922
|
+
|
1923
|
+
</div>
|
1924
|
+
|
1925
|
+
|
1926
|
+
<div id="same-ime-ext-onth-method" class="method-detail ">
|
1927
|
+
<a name="M001429"></a>
|
1928
|
+
|
1929
|
+
<div class="method-heading">
|
1930
|
+
|
1931
|
+
<span class="method-name">sameTimeNextMonth</span><span
|
1932
|
+
class="method-args">()</span>
|
1933
|
+
<span class="method-click-advice">click to toggle source</span>
|
1934
|
+
|
1935
|
+
</div>
|
1936
|
+
|
1937
|
+
<div class="method-description">
|
1938
|
+
|
1939
|
+
<p>
|
1940
|
+
Return a new time that is 1 month later than time but at the same time of
|
1941
|
+
day.
|
1942
|
+
</p>
|
1943
|
+
|
1944
|
+
|
1945
|
+
|
1946
|
+
<div class="method-source-code"
|
1947
|
+
id="same-ime-ext-onth-source">
|
1948
|
+
<pre>
|
1949
|
+
<span class="ruby-comment cmt"># File lib/TjTime.rb, line 262</span>
|
1950
|
+
262: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">sameTimeNextMonth</span>
|
1951
|
+
263: <span class="ruby-identifier">sec</span>, <span class="ruby-identifier">min</span>, <span class="ruby-identifier">hour</span>, <span class="ruby-identifier">day</span>, <span class="ruby-identifier">month</span>, <span class="ruby-identifier">year</span>, <span class="ruby-identifier">wday</span>, <span class="ruby-identifier">yday</span>, <span class="ruby-identifier">isdst</span>, <span class="ruby-identifier">tz</span> =
|
1952
|
+
264: <span class="ruby-ivar">@time</span>.<span class="ruby-identifier">localtime</span>.<span class="ruby-identifier">to_a</span>
|
1953
|
+
265: <span class="ruby-identifier">monMax</span> = <span class="ruby-identifier">month</span> <span class="ruby-operator">==</span> <span class="ruby-value">2</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">leapYear?</span>(<span class="ruby-identifier">year</span>) <span class="ruby-operator">?</span> <span class="ruby-value">29</span> <span class="ruby-operator">:</span> <span class="ruby-constant">MON_MAX</span>[<span class="ruby-identifier">month</span>]
|
1954
|
+
266: <span class="ruby-identifier">month</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
1955
|
+
267: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">month</span> <span class="ruby-operator">></span> <span class="ruby-value">12</span>
|
1956
|
+
268: <span class="ruby-identifier">month</span> = <span class="ruby-value">1</span>
|
1957
|
+
269: <span class="ruby-identifier">year</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
1958
|
+
270: <span class="ruby-keyword kw">end</span>
|
1959
|
+
271: <span class="ruby-identifier">day</span> = <span class="ruby-identifier">monMax</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">day</span> <span class="ruby-operator">>=</span> <span class="ruby-identifier">monMax</span>
|
1960
|
+
272: <span class="ruby-constant">TjTime</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">Time</span>.<span class="ruby-identifier">mktime</span>(<span class="ruby-identifier">year</span>, <span class="ruby-identifier">month</span>, <span class="ruby-identifier">day</span>, <span class="ruby-identifier">hour</span>, <span class="ruby-identifier">min</span>, <span class="ruby-identifier">sec</span>, <span class="ruby-value">0</span>))
|
1961
|
+
273: <span class="ruby-keyword kw">end</span></pre>
|
1962
|
+
</div>
|
1963
|
+
|
1964
|
+
</div>
|
1965
|
+
|
1966
|
+
|
1967
|
+
|
1968
|
+
|
1969
|
+
</div>
|
1970
|
+
|
1971
|
+
|
1972
|
+
<div id="same-ime-ext-uarter-method" class="method-detail ">
|
1973
|
+
<a name="M001430"></a>
|
1974
|
+
|
1975
|
+
<div class="method-heading">
|
1976
|
+
|
1977
|
+
<span class="method-name">sameTimeNextQuarter</span><span
|
1978
|
+
class="method-args">()</span>
|
1979
|
+
<span class="method-click-advice">click to toggle source</span>
|
1980
|
+
|
1981
|
+
</div>
|
1982
|
+
|
1983
|
+
<div class="method-description">
|
1984
|
+
|
1985
|
+
<p>
|
1986
|
+
Return a new time that is 1 quarter later than time but at the same time of
|
1987
|
+
day.
|
1988
|
+
</p>
|
1989
|
+
|
1990
|
+
|
1991
|
+
|
1992
|
+
<div class="method-source-code"
|
1993
|
+
id="same-ime-ext-uarter-source">
|
1994
|
+
<pre>
|
1995
|
+
<span class="ruby-comment cmt"># File lib/TjTime.rb, line 277</span>
|
1996
|
+
277: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">sameTimeNextQuarter</span>
|
1997
|
+
278: <span class="ruby-identifier">t</span> = <span class="ruby-ivar">@time</span>.<span class="ruby-identifier">localtime</span>.<span class="ruby-identifier">to_a</span>
|
1998
|
+
279: <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">t</span>[<span class="ruby-value">4</span>] <span class="ruby-operator">+=</span> <span class="ruby-value">3</span>) <span class="ruby-operator">></span> <span class="ruby-value">12</span>
|
1999
|
+
280: <span class="ruby-identifier">t</span>[<span class="ruby-value">4</span>] <span class="ruby-operator">-=</span> <span class="ruby-value">12</span>
|
2000
|
+
281: <span class="ruby-identifier">t</span>[<span class="ruby-value">5</span>] <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
2001
|
+
282: <span class="ruby-keyword kw">end</span>
|
2002
|
+
283: <span class="ruby-identifier">t</span>.<span class="ruby-identifier">slice!</span>(<span class="ruby-value">6</span>, <span class="ruby-value">4</span>)
|
2003
|
+
284: <span class="ruby-identifier">t</span>.<span class="ruby-identifier">reverse!</span>
|
2004
|
+
285: <span class="ruby-constant">TjTime</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">Time</span>.<span class="ruby-identifier">local</span>(*<span class="ruby-identifier">t</span>))
|
2005
|
+
286: <span class="ruby-keyword kw">end</span></pre>
|
2006
|
+
</div>
|
2007
|
+
|
2008
|
+
</div>
|
2009
|
+
|
2010
|
+
|
2011
|
+
|
2012
|
+
|
2013
|
+
</div>
|
2014
|
+
|
2015
|
+
|
2016
|
+
<div id="same-ime-ext-eek-method" class="method-detail ">
|
2017
|
+
<a name="M001428"></a>
|
2018
|
+
|
2019
|
+
<div class="method-heading">
|
2020
|
+
|
2021
|
+
<span class="method-name">sameTimeNextWeek</span><span
|
2022
|
+
class="method-args">()</span>
|
2023
|
+
<span class="method-click-advice">click to toggle source</span>
|
2024
|
+
|
2025
|
+
</div>
|
2026
|
+
|
2027
|
+
<div class="method-description">
|
2028
|
+
|
2029
|
+
<p>
|
2030
|
+
Return a new time that is 1 week later than time but at the same time of
|
2031
|
+
day.
|
2032
|
+
</p>
|
2033
|
+
|
2034
|
+
|
2035
|
+
|
2036
|
+
<div class="method-source-code"
|
2037
|
+
id="same-ime-ext-eek-source">
|
2038
|
+
<pre>
|
2039
|
+
<span class="ruby-comment cmt"># File lib/TjTime.rb, line 249</span>
|
2040
|
+
249: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">sameTimeNextWeek</span>
|
2041
|
+
250: <span class="ruby-identifier">delta</span> = [ <span class="ruby-value">0</span>, <span class="ruby-value">1</span>, <span class="ruby-value">1</span> ]
|
2042
|
+
251: <span class="ruby-identifier">localT1</span> = <span class="ruby-ivar">@time</span>.<span class="ruby-identifier">localtime</span>.<span class="ruby-identifier">to_a</span>
|
2043
|
+
252: <span class="ruby-identifier">delta</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">d</span><span class="ruby-operator">|</span>
|
2044
|
+
253: <span class="ruby-identifier">t</span> = <span class="ruby-ivar">@time</span> <span class="ruby-operator">+</span> (<span class="ruby-value">7</span> * <span class="ruby-value">24</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">d</span>) * <span class="ruby-value">60</span> * <span class="ruby-value">60</span>
|
2045
|
+
254: <span class="ruby-identifier">localT2</span> = <span class="ruby-identifier">t</span>.<span class="ruby-identifier">localtime</span>.<span class="ruby-identifier">to_a</span>
|
2046
|
+
255: <span class="ruby-keyword kw">return</span> <span class="ruby-constant">TjTime</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">t</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">localT1</span>[<span class="ruby-value">0</span>, <span class="ruby-value">3</span>] <span class="ruby-operator">==</span> <span class="ruby-identifier">localT2</span>[<span class="ruby-value">0</span>, <span class="ruby-value">3</span>]
|
2047
|
+
256: <span class="ruby-keyword kw">end</span>
|
2048
|
+
257: <span class="ruby-identifier">raise</span> <span class="ruby-node">"Algorithm is broken for #{@time}"</span>
|
2049
|
+
258: <span class="ruby-keyword kw">end</span></pre>
|
2050
|
+
</div>
|
2051
|
+
|
2052
|
+
</div>
|
2053
|
+
|
2054
|
+
|
2055
|
+
|
2056
|
+
|
2057
|
+
</div>
|
2058
|
+
|
2059
|
+
|
2060
|
+
<div id="same-ime-ext-ear-method" class="method-detail ">
|
2061
|
+
<a name="M001431"></a>
|
2062
|
+
|
2063
|
+
<div class="method-heading">
|
2064
|
+
|
2065
|
+
<span class="method-name">sameTimeNextYear</span><span
|
2066
|
+
class="method-args">()</span>
|
2067
|
+
<span class="method-click-advice">click to toggle source</span>
|
2068
|
+
|
2069
|
+
</div>
|
2070
|
+
|
2071
|
+
<div class="method-description">
|
2072
|
+
|
2073
|
+
<p>
|
2074
|
+
Return a new time that is 1 year later than time but at the same time of
|
2075
|
+
day.
|
2076
|
+
</p>
|
2077
|
+
|
2078
|
+
|
2079
|
+
|
2080
|
+
<div class="method-source-code"
|
2081
|
+
id="same-ime-ext-ear-source">
|
2082
|
+
<pre>
|
2083
|
+
<span class="ruby-comment cmt"># File lib/TjTime.rb, line 290</span>
|
2084
|
+
290: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">sameTimeNextYear</span>
|
2085
|
+
291: <span class="ruby-identifier">t</span> = <span class="ruby-ivar">@time</span>.<span class="ruby-identifier">localtime</span>.<span class="ruby-identifier">to_a</span>
|
2086
|
+
292: <span class="ruby-identifier">t</span>[<span class="ruby-value">5</span>] <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
2087
|
+
293: <span class="ruby-identifier">t</span>.<span class="ruby-identifier">slice!</span>(<span class="ruby-value">6</span>, <span class="ruby-value">4</span>)
|
2088
|
+
294: <span class="ruby-identifier">t</span>.<span class="ruby-identifier">reverse!</span>
|
2089
|
+
295: <span class="ruby-constant">TjTime</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">Time</span>.<span class="ruby-identifier">local</span>(*<span class="ruby-identifier">t</span>))
|
2090
|
+
296: <span class="ruby-keyword kw">end</span></pre>
|
2091
|
+
</div>
|
2092
|
+
|
2093
|
+
</div>
|
2094
|
+
|
2095
|
+
|
2096
|
+
|
2097
|
+
|
2098
|
+
</div>
|
2099
|
+
|
2100
|
+
|
2101
|
+
<div id="seconds-f-ay-method" class="method-detail ">
|
2102
|
+
<a name="M001408"></a>
|
2103
|
+
|
2104
|
+
<div class="method-heading">
|
2105
|
+
|
2106
|
+
<span class="method-name">secondsOfDay</span><span
|
2107
|
+
class="method-args">(tz = nil)</span>
|
2108
|
+
<span class="method-click-advice">click to toggle source</span>
|
2109
|
+
|
2110
|
+
</div>
|
2111
|
+
|
2112
|
+
<div class="method-description">
|
2113
|
+
|
2114
|
+
<p>
|
2115
|
+
Returns the total number of seconds of the day. The time is assumed to be
|
2116
|
+
in the time zone specified by <em>tz</em>.
|
2117
|
+
</p>
|
2118
|
+
|
2119
|
+
|
2120
|
+
|
2121
|
+
<div class="method-source-code"
|
2122
|
+
id="seconds-f-ay-source">
|
2123
|
+
<pre>
|
2124
|
+
<span class="ruby-comment cmt"># File lib/TjTime.rb, line 94</span>
|
2125
|
+
94: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">secondsOfDay</span>(<span class="ruby-identifier">tz</span> = <span class="ruby-keyword kw">nil</span>)
|
2126
|
+
95: <span class="ruby-comment cmt"># TODO: Add timezone support</span>
|
2127
|
+
96: (<span class="ruby-ivar">@time</span>.<span class="ruby-identifier">to_i</span> <span class="ruby-operator">+</span> <span class="ruby-ivar">@time</span>.<span class="ruby-identifier">gmt_offset</span>) <span class="ruby-operator">%</span> (<span class="ruby-value">60</span> * <span class="ruby-value">60</span> * <span class="ruby-value">24</span>)
|
2128
|
+
97: <span class="ruby-keyword kw">end</span></pre>
|
2129
|
+
</div>
|
2130
|
+
|
2131
|
+
</div>
|
2132
|
+
|
2133
|
+
|
2134
|
+
|
2135
|
+
|
2136
|
+
</div>
|
2137
|
+
|
2138
|
+
|
2139
|
+
<div id="short-onth-ame-method" class="method-detail ">
|
2140
|
+
<a name="M001440"></a>
|
2141
|
+
|
2142
|
+
<div class="method-heading">
|
2143
|
+
|
2144
|
+
<span class="method-name">shortMonthName</span><span
|
2145
|
+
class="method-args">()</span>
|
2146
|
+
<span class="method-click-advice">click to toggle source</span>
|
2147
|
+
|
2148
|
+
</div>
|
2149
|
+
|
2150
|
+
<div class="method-description">
|
2151
|
+
|
2152
|
+
<p>
|
2153
|
+
Return the abbreviated month name.
|
2154
|
+
</p>
|
2155
|
+
|
2156
|
+
|
2157
|
+
|
2158
|
+
<div class="method-source-code"
|
2159
|
+
id="short-onth-ame-source">
|
2160
|
+
<pre>
|
2161
|
+
<span class="ruby-comment cmt"># File lib/TjTime.rb, line 352</span>
|
2162
|
+
352: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">shortMonthName</span>
|
2163
|
+
353: <span class="ruby-ivar">@time</span>.<span class="ruby-identifier">strftime</span>(<span class="ruby-value str">'%b'</span>)
|
2164
|
+
354: <span class="ruby-keyword kw">end</span></pre>
|
2165
|
+
</div>
|
2166
|
+
|
2167
|
+
</div>
|
2168
|
+
|
2169
|
+
|
2170
|
+
|
2171
|
+
|
2172
|
+
</div>
|
2173
|
+
|
2174
|
+
|
2175
|
+
<div id="to-i-method" class="method-detail ">
|
2176
|
+
<a name="M001439"></a>
|
2177
|
+
|
2178
|
+
<div class="method-heading">
|
2179
|
+
|
2180
|
+
<span class="method-name">to_i</span><span
|
2181
|
+
class="method-args">()</span>
|
2182
|
+
<span class="method-click-advice">click to toggle source</span>
|
2183
|
+
|
2184
|
+
</div>
|
2185
|
+
|
2186
|
+
<div class="method-description">
|
2187
|
+
|
2188
|
+
<p>
|
2189
|
+
Return the seconds since Epoch.
|
2190
|
+
</p>
|
2191
|
+
|
2192
|
+
|
2193
|
+
|
2194
|
+
<div class="method-source-code"
|
2195
|
+
id="to-i-source">
|
2196
|
+
<pre>
|
2197
|
+
<span class="ruby-comment cmt"># File lib/TjTime.rb, line 347</span>
|
2198
|
+
347: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_i</span>
|
2199
|
+
348: <span class="ruby-ivar">@time</span>.<span class="ruby-identifier">to_i</span>
|
2200
|
+
349: <span class="ruby-keyword kw">end</span></pre>
|
2201
|
+
</div>
|
2202
|
+
|
2203
|
+
</div>
|
2204
|
+
|
2205
|
+
|
2206
|
+
|
2207
|
+
|
2208
|
+
</div>
|
2209
|
+
|
2210
|
+
|
2211
|
+
<div id="to-s-method" class="method-detail ">
|
2212
|
+
<a name="M001438"></a>
|
2213
|
+
|
2214
|
+
<div class="method-heading">
|
2215
|
+
|
2216
|
+
<span class="method-name">to_s</span><span
|
2217
|
+
class="method-args">(format = nil)</span>
|
2218
|
+
<span class="method-click-advice">click to toggle source</span>
|
2219
|
+
|
2220
|
+
</div>
|
2221
|
+
|
2222
|
+
<div class="method-description">
|
2223
|
+
|
2224
|
+
<p>
|
2225
|
+
This function is just a wrapper around Time.strftime(). In case @time is
|
2226
|
+
nil, it returns ‘unkown’.
|
2227
|
+
</p>
|
2228
|
+
|
2229
|
+
|
2230
|
+
|
2231
|
+
<div class="method-source-code"
|
2232
|
+
id="to-s-source">
|
2233
|
+
<pre>
|
2234
|
+
<span class="ruby-comment cmt"># File lib/TjTime.rb, line 337</span>
|
2235
|
+
337: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_s</span>(<span class="ruby-identifier">format</span> = <span class="ruby-keyword kw">nil</span>)
|
2236
|
+
338: <span class="ruby-keyword kw">return</span> <span class="ruby-value str">'unknown'</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@time</span>.<span class="ruby-identifier">nil?</span>
|
2237
|
+
339: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">format</span>.<span class="ruby-identifier">nil?</span>
|
2238
|
+
340: <span class="ruby-identifier">format</span> = <span class="ruby-value str">'%Y-%m-%d-%H:%M'</span> <span class="ruby-operator">+</span> (<span class="ruby-ivar">@time</span>.<span class="ruby-identifier">sec</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span> <span class="ruby-operator">?</span> <span class="ruby-value str">''</span> <span class="ruby-operator">:</span> <span class="ruby-value str">':%S'</span>) <span class="ruby-operator">+</span> <span class="ruby-value str">'-%z'</span>
|
2239
|
+
341: <span class="ruby-keyword kw">end</span>
|
2240
|
+
342: <span class="ruby-comment cmt"># Always report values in local timezone</span>
|
2241
|
+
343: <span class="ruby-ivar">@time</span>.<span class="ruby-identifier">dup</span>.<span class="ruby-identifier">localtime</span>.<span class="ruby-identifier">strftime</span>(<span class="ruby-identifier">format</span>)
|
2242
|
+
344: <span class="ruby-keyword kw">end</span></pre>
|
2243
|
+
</div>
|
2244
|
+
|
2245
|
+
</div>
|
2246
|
+
|
2247
|
+
|
2248
|
+
|
2249
|
+
|
2250
|
+
</div>
|
2251
|
+
|
2252
|
+
|
2253
|
+
<div id="upto-method" class="method-detail ">
|
2254
|
+
<a name="M001418"></a>
|
2255
|
+
|
2256
|
+
<div class="method-heading">
|
2257
|
+
|
2258
|
+
<span class="method-name">upto</span><span
|
2259
|
+
class="method-args">(endDate, step = 1)</span>
|
2260
|
+
<span class="method-click-advice">click to toggle source</span>
|
2261
|
+
|
2262
|
+
</div>
|
2263
|
+
|
2264
|
+
<div class="method-description">
|
2265
|
+
|
2266
|
+
<p>
|
2267
|
+
Iterator that executes the block until time has reached <em>endDate</em>
|
2268
|
+
increasing time by <em>step</em> on each iteration.
|
2269
|
+
</p>
|
2270
|
+
|
2271
|
+
|
2272
|
+
|
2273
|
+
<div class="method-source-code"
|
2274
|
+
id="upto-source">
|
2275
|
+
<pre>
|
2276
|
+
<span class="ruby-comment cmt"># File lib/TjTime.rb, line 152</span>
|
2277
|
+
152: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">upto</span>(<span class="ruby-identifier">endDate</span>, <span class="ruby-identifier">step</span> = <span class="ruby-value">1</span>)
|
2278
|
+
153: <span class="ruby-identifier">t</span> = <span class="ruby-ivar">@time</span>
|
2279
|
+
154: <span class="ruby-keyword kw">while</span> <span class="ruby-identifier">t</span> <span class="ruby-operator"><</span> <span class="ruby-identifier">endDate</span>.<span class="ruby-identifier">time</span>
|
2280
|
+
155: <span class="ruby-keyword kw">yield</span>(<span class="ruby-constant">TjTime</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">t</span>))
|
2281
|
+
156: <span class="ruby-identifier">t</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">step</span>
|
2282
|
+
157: <span class="ruby-keyword kw">end</span>
|
2283
|
+
158: <span class="ruby-keyword kw">end</span></pre>
|
2284
|
+
</div>
|
2285
|
+
|
2286
|
+
</div>
|
2287
|
+
|
2288
|
+
|
2289
|
+
|
2290
|
+
|
2291
|
+
</div>
|
2292
|
+
|
2293
|
+
|
2294
|
+
<div id="week-method" class="method-detail ">
|
2295
|
+
<a name="M001442"></a>
|
2296
|
+
|
2297
|
+
<div class="method-heading">
|
2298
|
+
|
2299
|
+
<span class="method-name">week</span><span
|
2300
|
+
class="method-args">(weekStartsMonday)</span>
|
2301
|
+
<span class="method-click-advice">click to toggle source</span>
|
2302
|
+
|
2303
|
+
</div>
|
2304
|
+
|
2305
|
+
<div class="method-description">
|
2306
|
+
|
2307
|
+
<p>
|
2308
|
+
Return the week number. <em>weekStartsMonday</em> specifies wheter the
|
2309
|
+
counting should be for weeks starting Mondays or Sundays.
|
2310
|
+
</p>
|
2311
|
+
|
2312
|
+
|
2313
|
+
|
2314
|
+
<div class="method-source-code"
|
2315
|
+
id="week-source">
|
2316
|
+
<pre>
|
2317
|
+
<span class="ruby-comment cmt"># File lib/TjTime.rb, line 363</span>
|
2318
|
+
363: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">week</span>(<span class="ruby-identifier">weekStartsMonday</span>)
|
2319
|
+
364: <span class="ruby-ivar">@time</span>.<span class="ruby-identifier">strftime</span>(<span class="ruby-identifier">weekStartsMonday</span> <span class="ruby-operator">?</span> <span class="ruby-value str">'%W'</span> <span class="ruby-operator">:</span> <span class="ruby-value str">'%U'</span>)
|
2320
|
+
365: <span class="ruby-keyword kw">end</span></pre>
|
2321
|
+
</div>
|
2322
|
+
|
2323
|
+
</div>
|
2324
|
+
|
2325
|
+
|
2326
|
+
|
2327
|
+
|
2328
|
+
</div>
|
2329
|
+
|
2330
|
+
|
2331
|
+
<div id="weekday-nd-ate-method" class="method-detail ">
|
2332
|
+
<a name="M001444"></a>
|
2333
|
+
|
2334
|
+
<div class="method-heading">
|
2335
|
+
|
2336
|
+
<span class="method-name">weekdayAndDate</span><span
|
2337
|
+
class="method-args">()</span>
|
2338
|
+
<span class="method-click-advice">click to toggle source</span>
|
2339
|
+
|
2340
|
+
</div>
|
2341
|
+
|
2342
|
+
<div class="method-description">
|
2343
|
+
|
2344
|
+
<p>
|
2345
|
+
Return the abbreviated weekday and the full date. E. g. ‘Sat
|
2346
|
+
2007-11-03’.
|
2347
|
+
</p>
|
2348
|
+
|
2349
|
+
|
2350
|
+
|
2351
|
+
<div class="method-source-code"
|
2352
|
+
id="weekday-nd-ate-source">
|
2353
|
+
<pre>
|
2354
|
+
<span class="ruby-comment cmt"># File lib/TjTime.rb, line 373</span>
|
2355
|
+
373: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">weekdayAndDate</span>
|
2356
|
+
374: <span class="ruby-ivar">@time</span>.<span class="ruby-identifier">strftime</span>(<span class="ruby-value str">'%A %Y-%m-%d'</span>)
|
2357
|
+
375: <span class="ruby-keyword kw">end</span></pre>
|
2358
|
+
</div>
|
2359
|
+
|
2360
|
+
</div>
|
2361
|
+
|
2362
|
+
|
2363
|
+
|
2364
|
+
|
2365
|
+
</div>
|
2366
|
+
|
2367
|
+
|
2368
|
+
<div id="weeks-o-method" class="method-detail ">
|
2369
|
+
<a name="M001434"></a>
|
2370
|
+
|
2371
|
+
<div class="method-heading">
|
2372
|
+
|
2373
|
+
<span class="method-name">weeksTo</span><span
|
2374
|
+
class="method-args">(date)</span>
|
2375
|
+
<span class="method-click-advice">click to toggle source</span>
|
2376
|
+
|
2377
|
+
</div>
|
2378
|
+
|
2379
|
+
<div class="method-description">
|
2380
|
+
|
2381
|
+
<p>
|
2382
|
+
Return the number of weeks between this time and <em>date</em>. The result
|
2383
|
+
is always rounded up.
|
2384
|
+
</p>
|
2385
|
+
|
2386
|
+
|
2387
|
+
|
2388
|
+
<div class="method-source-code"
|
2389
|
+
id="weeks-o-source">
|
2390
|
+
<pre>
|
2391
|
+
<span class="ruby-comment cmt"># File lib/TjTime.rb, line 313</span>
|
2392
|
+
313: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">weeksTo</span>(<span class="ruby-identifier">date</span>)
|
2393
|
+
314: <span class="ruby-identifier">countIntervals</span>(<span class="ruby-identifier">date</span>, <span class="ruby-value">:sameTimeNextWeek</span>)
|
2394
|
+
315: <span class="ruby-keyword kw">end</span></pre>
|
2395
|
+
</div>
|
2396
|
+
|
2397
|
+
</div>
|
2398
|
+
|
2399
|
+
|
2400
|
+
|
2401
|
+
|
2402
|
+
</div>
|
2403
|
+
|
2404
|
+
|
2405
|
+
<div id="years-o-method" class="method-detail ">
|
2406
|
+
<a name="M001437"></a>
|
2407
|
+
|
2408
|
+
<div class="method-heading">
|
2409
|
+
|
2410
|
+
<span class="method-name">yearsTo</span><span
|
2411
|
+
class="method-args">(date)</span>
|
2412
|
+
<span class="method-click-advice">click to toggle source</span>
|
2413
|
+
|
2414
|
+
</div>
|
2415
|
+
|
2416
|
+
<div class="method-description">
|
2417
|
+
|
2418
|
+
<p>
|
2419
|
+
Return the number of years between this time and <em>date</em>. The result
|
2420
|
+
is always rounded up.
|
2421
|
+
</p>
|
2422
|
+
|
2423
|
+
|
2424
|
+
|
2425
|
+
<div class="method-source-code"
|
2426
|
+
id="years-o-source">
|
2427
|
+
<pre>
|
2428
|
+
<span class="ruby-comment cmt"># File lib/TjTime.rb, line 331</span>
|
2429
|
+
331: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">yearsTo</span>(<span class="ruby-identifier">date</span>)
|
2430
|
+
332: <span class="ruby-identifier">countIntervals</span>(<span class="ruby-identifier">date</span>, <span class="ruby-value">:sameTimeNextYear</span>)
|
2431
|
+
333: <span class="ruby-keyword kw">end</span></pre>
|
2432
|
+
</div>
|
2433
|
+
|
2434
|
+
</div>
|
2435
|
+
|
2436
|
+
|
2437
|
+
|
2438
|
+
|
2439
|
+
</div>
|
2440
|
+
|
2441
|
+
|
2442
|
+
</div>
|
2443
|
+
|
2444
|
+
<div id="private-instance-method-details" class="method-section section">
|
2445
|
+
<h3 class="section-header">Private Instance Methods</h3>
|
2446
|
+
|
2447
|
+
|
2448
|
+
<div id="count-ntervals-method" class="method-detail ">
|
2449
|
+
<a name="M001448"></a>
|
2450
|
+
|
2451
|
+
<div class="method-heading">
|
2452
|
+
|
2453
|
+
<span class="method-name">countIntervals</span><span
|
2454
|
+
class="method-args">(date, stepFunc)</span>
|
2455
|
+
<span class="method-click-advice">click to toggle source</span>
|
2456
|
+
|
2457
|
+
</div>
|
2458
|
+
|
2459
|
+
<div class="method-description">
|
2460
|
+
|
2461
|
+
|
2462
|
+
|
2463
|
+
|
2464
|
+
|
2465
|
+
<div class="method-source-code"
|
2466
|
+
id="count-ntervals-source">
|
2467
|
+
<pre>
|
2468
|
+
<span class="ruby-comment cmt"># File lib/TjTime.rb, line 408</span>
|
2469
|
+
408: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">countIntervals</span>(<span class="ruby-identifier">date</span>, <span class="ruby-identifier">stepFunc</span>)
|
2470
|
+
409: <span class="ruby-identifier">i</span> = <span class="ruby-value">0</span>
|
2471
|
+
410: <span class="ruby-identifier">t1</span>, <span class="ruby-identifier">t2</span> = <span class="ruby-identifier">order</span>(<span class="ruby-identifier">date</span>)
|
2472
|
+
411: <span class="ruby-keyword kw">while</span> <span class="ruby-identifier">t1</span> <span class="ruby-operator"><</span> <span class="ruby-identifier">t2</span>
|
2473
|
+
412: <span class="ruby-identifier">t1</span> = <span class="ruby-identifier">t1</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">stepFunc</span>)
|
2474
|
+
413: <span class="ruby-identifier">i</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
2475
|
+
414: <span class="ruby-keyword kw">end</span>
|
2476
|
+
415: <span class="ruby-identifier">i</span>
|
2477
|
+
416: <span class="ruby-keyword kw">end</span></pre>
|
2478
|
+
</div>
|
2479
|
+
|
2480
|
+
</div>
|
2481
|
+
|
2482
|
+
|
2483
|
+
|
2484
|
+
|
2485
|
+
</div>
|
2486
|
+
|
2487
|
+
|
2488
|
+
<div id="leap-ear--method" class="method-detail ">
|
2489
|
+
<a name="M001449"></a>
|
2490
|
+
|
2491
|
+
<div class="method-heading">
|
2492
|
+
|
2493
|
+
<span class="method-name">leapYear?</span><span
|
2494
|
+
class="method-args">(year)</span>
|
2495
|
+
<span class="method-click-advice">click to toggle source</span>
|
2496
|
+
|
2497
|
+
</div>
|
2498
|
+
|
2499
|
+
<div class="method-description">
|
2500
|
+
|
2501
|
+
|
2502
|
+
|
2503
|
+
|
2504
|
+
|
2505
|
+
<div class="method-source-code"
|
2506
|
+
id="leap-ear--source">
|
2507
|
+
<pre>
|
2508
|
+
<span class="ruby-comment cmt"># File lib/TjTime.rb, line 418</span>
|
2509
|
+
418: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">leapYear?</span>(<span class="ruby-identifier">year</span>)
|
2510
|
+
419: <span class="ruby-keyword kw">case</span>
|
2511
|
+
420: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">year</span> <span class="ruby-operator">%</span> <span class="ruby-value">400</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
|
2512
|
+
421: <span class="ruby-keyword kw">true</span>
|
2513
|
+
422: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">year</span> <span class="ruby-operator">%</span> <span class="ruby-value">100</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
|
2514
|
+
423: <span class="ruby-keyword kw">false</span>
|
2515
|
+
424: <span class="ruby-keyword kw">else</span>
|
2516
|
+
425: <span class="ruby-identifier">year</span> <span class="ruby-operator">%</span> <span class="ruby-value">4</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
|
2517
|
+
426: <span class="ruby-keyword kw">end</span>
|
2518
|
+
427: <span class="ruby-keyword kw">end</span></pre>
|
2519
|
+
</div>
|
2520
|
+
|
2521
|
+
</div>
|
2522
|
+
|
2523
|
+
|
2524
|
+
|
2525
|
+
|
2526
|
+
</div>
|
2527
|
+
|
2528
|
+
|
2529
|
+
<div id="order-method" class="method-detail ">
|
2530
|
+
<a name="M001447"></a>
|
2531
|
+
|
2532
|
+
<div class="method-heading">
|
2533
|
+
|
2534
|
+
<span class="method-name">order</span><span
|
2535
|
+
class="method-args">(date)</span>
|
2536
|
+
<span class="method-click-advice">click to toggle source</span>
|
2537
|
+
|
2538
|
+
</div>
|
2539
|
+
|
2540
|
+
<div class="method-description">
|
2541
|
+
|
2542
|
+
|
2543
|
+
|
2544
|
+
|
2545
|
+
|
2546
|
+
<div class="method-source-code"
|
2547
|
+
id="order-source">
|
2548
|
+
<pre>
|
2549
|
+
<span class="ruby-comment cmt"># File lib/TjTime.rb, line 397</span>
|
2550
|
+
397: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">order</span>(<span class="ruby-identifier">date</span>)
|
2551
|
+
398: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">date</span>.<span class="ruby-identifier">time</span> <span class="ruby-operator"><</span> <span class="ruby-ivar">@time</span>
|
2552
|
+
399: <span class="ruby-identifier">t1</span> = <span class="ruby-identifier">date</span>
|
2553
|
+
400: <span class="ruby-identifier">t2</span> = <span class="ruby-keyword kw">self</span>
|
2554
|
+
401: <span class="ruby-keyword kw">else</span>
|
2555
|
+
402: <span class="ruby-identifier">t1</span> = <span class="ruby-keyword kw">self</span>
|
2556
|
+
403: <span class="ruby-identifier">t2</span> = <span class="ruby-identifier">date</span>
|
2557
|
+
404: <span class="ruby-keyword kw">end</span>
|
2558
|
+
405: [ <span class="ruby-identifier">t1</span>, <span class="ruby-identifier">t2</span> ]
|
2559
|
+
406: <span class="ruby-keyword kw">end</span></pre>
|
2560
|
+
</div>
|
2561
|
+
|
2562
|
+
</div>
|
2563
|
+
|
2564
|
+
|
2565
|
+
|
2566
|
+
|
2567
|
+
</div>
|
2568
|
+
|
2569
|
+
|
2570
|
+
</div>
|
2571
|
+
|
2572
|
+
|
2573
|
+
</div>
|
2574
|
+
|
2575
|
+
|
2576
|
+
<div id="rdoc-debugging-section-dump" class="debugging-section">
|
2577
|
+
|
2578
|
+
<p>Disabled; run with --debug to generate this.</p>
|
2579
|
+
|
2580
|
+
</div>
|
2581
|
+
|
2582
|
+
<div id="validator-badges">
|
2583
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
2584
|
+
<p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
|
2585
|
+
Rdoc Generator</a> 1.1.6</small>.</p>
|
2586
|
+
</div>
|
2587
|
+
|
2588
|
+
</body>
|
2589
|
+
</html>
|
2590
|
+
|