Blame view

pex2024/documents/calcs.jl 628 Bytes
3fd98130   Francisco Coelho   Completed TASKS d...
1
2
3
4
5
6
7
8
9
10
using Dates

function budget(items, overhead=0.25)
    partial = sum(items)
    partial_overhead = overhead * partial
    total = partial + partial_overhead
    return (partial, partial_overhead, total)
end

function get_budget()
4fffc2cd   Francisco Coelho   After IJCAR24 rev...
11
    items = [700, 500, 576, 2660, 12*1686]
3fd98130   Francisco Coelho   Completed TASKS d...
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
    (partial, overhead, total) = budget(items)
    println("Partial : $(partial)\nOverhead: $(overhead)\nTotal   : $total")
end

function project_month(n, startdate=Date(2024,09,01))
    months = Dates.Month(n)
    return startdate + months
end

function get_month(month=8)
    cm = project_month(month)
    println("M$(month) -> $(cm)")
end

get_budget()