webcalendar

Check-in [818ac02765]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Add duration
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | master | trunk
Files: files | file ages | folders
SHA3-256:818ac027656e0bf38a18c65929a1f0fa9d6df75b158a91e45539dda6a40d59db
User & Date: ajv-899-334-8894@vsta.org 2018-02-05 17:01:46
Context
2018-03-29
04:19
Make it easier to view another day check-in: 564bb5cc45 user: ajv-899-334-8894@vsta.org tags: master, trunk
2018-02-05
17:01
Add duration check-in: 818ac02765 user: ajv-899-334-8894@vsta.org tags: master, trunk
2018-01-12
00:03
Get running on modern PHP check-in: f3f78547ec user: ajv-899-334-8894@vsta.org tags: master, trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to cgi-bin/ttoday.py.

41
42
43
44
45
46
47

48


49
50
51
52
53
54
55
56
57
58
    evs = sorted(webcal.load_user(uname, filter_target),
	cmp=lambda ev1,ev2: cmp_time(ev1.begin, ev2.begin))

    for ev in evs:
	if ev.untimed:
	    w("      %s\n" % (ev.name,))
	    continue

	w("%s " % (time.strftime("%H:%M", ev.begin),))


	if ev.uname != uname:
	    w("%8s " % (ev.uname,))
	else:
	    w("%8s " % (" ",))
	w("%s\n" % (ev.name,))

if __name__ == "__main__":
    init_cli()
    run()
    sys.exit(0)







>
|
>
>










41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
    evs = sorted(webcal.load_user(uname, filter_target),
	cmp=lambda ev1,ev2: cmp_time(ev1.begin, ev2.begin))

    for ev in evs:
	if ev.untimed:
	    w("      %s\n" % (ev.name,))
	    continue
	w("%s-%s " % (
	    time.strftime("%H:%M", ev.begin),
	    time.strftime("%H:%M",
	     time.localtime(time.mktime(ev.begin) + ev.dur*60))))
	if ev.uname != uname:
	    w("%8s " % (ev.uname,))
	else:
	    w("%8s " % (" ",))
	w("%s\n" % (ev.name,))

if __name__ == "__main__":
    init_cli()
    run()
    sys.exit(0)