pub struct DailySummary {
pub date: NaiveDate,
pub duration: Duration,
pub productivity: f64,
}Expand description
Represents a complete work summary for a single calendar day.
This structure encapsulates all the key metrics needed to understand work performance on a given day, including both time-based and productivity-based measurements. It serves as the fundamental unit for monthly reporting and analysis.
§Data Components
§Duration Tracking
The duration represents net productive work time:
- Gross Time: Total presence time (workday start to end)
- Pause Time: All break periods during the day
- Net Time: Gross time minus pause time (stored in duration field)
§Productivity Metrics
Productivity is calculated as a percentage representing work efficiency:
- Formula: (Net Work Time / Gross Presence Time) × 100
- Range: 0.0 to 100.0 (theoretical maximum)
- Typical Values: 70-90% for most office work patterns
- Factors: Affected by meeting frequency, break patterns, and work type
§Use Cases
§Individual Analysis
- Daily productivity tracking and improvement
- Work pattern analysis and optimization
- Break frequency and duration analysis
§Organizational Reporting
- Monthly time sheets and hour summaries
- Productivity benchmarking across teams
- Resource allocation and planning data
- Compliance with work hour regulations
§External Integration
- Payroll system integration
- Project time allocation
- Client billing and invoicing
- Performance review documentation
Fields§
§date: NaiveDateThe specific calendar date for this work summary.
Uses NaiveDate to avoid timezone complications in reporting.
All daily summaries are associated with local calendar dates
for consistency with user expectations and business requirements.
§Date Handling
- Local Time: Uses system local time for date determination
- Calendar Days: Aligned with user’s local calendar
- Reporting Periods: Consistent with organizational calendars
- Time Zones: Avoids complexity by using naive dates
duration: DurationThe total net productive work duration for this day.
This represents the actual working time after subtracting all pause periods from the total presence time. It provides the most accurate measure of productive work hours.
§Calculation Method
Net Duration = (Workday End - Workday Start) - Total Pause Time
Example:
Workday: 09:00 - 17:30 (8h 30m total presence)
Pauses: 30m lunch + 15m coffee breaks = 45m
Net Duration: 8h 30m - 45m = 7h 45m§Quality Considerations
- Accuracy: Reflects actual productive work time
- Billing: Suitable for client billing and time tracking
- Analysis: Enables meaningful productivity analysis
- Reporting: Meets organizational reporting standards
productivity: f64Work productivity percentage for this day (0.0 to 100.0).
This metric provides insight into work efficiency by comparing net productive time against total presence time. It helps identify patterns in work effectiveness and opportunities for improvement.
§Calculation Formula
Productivity = (Net Work Time / Gross Presence Time) × 100
Example:
Net Work: 7h 45m = 465 minutes
Gross Presence: 8h 30m = 510 minutes
Productivity = (465 / 510) × 100 = 91.2%§Interpretation Guidelines
- 90-100%: Highly focused work with minimal interruptions
- 80-90%: Good productivity with normal break patterns
- 70-80%: Moderate productivity, may indicate heavy meeting load
- 60-70%: Lower productivity, worth investigating causes
- <60%: Potential issues with work patterns or data accuracy
§Factors Affecting Productivity
- Meeting Density: High meeting days typically show lower productivity
- Work Type: Creative work may have different patterns than administrative
- Break Habits: More frequent short breaks vs. fewer long breaks
- External Factors: Interruptions, system issues, training sessions
Trait Implementations§
Source§impl Clone for DailySummary
impl Clone for DailySummary
Source§fn clone(&self) -> DailySummary
fn clone(&self) -> DailySummary
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more