summaryrefslogtreecommitdiff
path: root/ui-stats.h
blob: f0761baec1d5ade260ac326c34e5575bda3740e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#ifndef UI_STATS_H
#define UI_STATS_H

#include "cgit.h"

struct cgit_period {
	const char code;
	const char *name;
	int max_periods;
	int count;

	/* Convert a tm value to the first day in the period */
	void (*trunc)(struct tm *tm);

	/* Update tm value to start of next/previous period */
	void (*dec)(struct tm *tm);
	void (*inc)(struct tm *tm);

	/* Pretty-print a tm value */
	char *(*pretty)(struct tm *tm);
};

extern int cgit_find_stats_period(const char *expr, struct cgit_period **period);
extern const char *cgit_find_stats_periodname(int idx);

extern void cgit_show_stats(struct cgit_context *ctx);

#endif /* UI_STATS_H */
/add now remembers the date on reloadingRené 'Necoro' Neumann1-1/+16 2020-01-11Fix from upgrading flask-sqlalchemyRené 'Necoro' Neumann2-3/+6 2020-01-11Update Flask URLRené 'Necoro' Neumann1-1/+1 2020-01-11Increase copyrightRené 'Necoro' Neumann1-1/+1 2017-02-12Incorporate API changesRené 'Necoro' Neumann3-6/+6 2017-02-12Migrate flask.ext.foo to flask_fooRené 'Necoro' Neumann3-4/+4 2017-02-12Enable debugging for manage.shRené 'Necoro' Neumann1-1/+1 2017-02-12No need for flask-script anymore; flask provides this out of the boxRené 'Necoro' Neumann3-28/+17 2017-02-12No need for flask-sqlalchemy to track modifications and send eventsRené 'Necoro' Neumann1-0/+1 2017-02-12FixRené 'Necoro' Neumann1-1/+1 2016-07-08Constant -> KonstantRené 'Necoro' Neumann1-1/+1 2016-07-052to3 fixed too muchRené 'Necoro' Neumann1-1/+1 2016-07-052to3 conversionRené 'Necoro' Neumann12-42/+42 2016-07-05First batch of py3 changesRené 'Necoro' Neumann7-8/+7 2016-05-01Removed base 'Expense' class; introduce CategoryModel insteadRené 'Necoro' Neumann1-6/+7 2016-05-01Ignore .pyoRené 'Necoro' Neumann1-0/+1