Have a look at the mktime funktin in awk
With it you can convert date to seconds so it be easy to compare.
This prints how many days there are between $1 and $2
awk '{split($1, sd, "-");split($2, ed, "-");print $0,(mktime(ed[3] s ed[2] s ed[1] s 0 s 0 s 0)-mktime(sd[3] s sd[2] s sd[1] s 0 s 0 s 0))/86400}' s=' ' file 09-11-2013 09-12-2013 30 10-02-2013 10-02-2013 0 26-10-2013 27-10-2013 1 12-01-2013 12-02-2013 31 22-02-2013 23-02-2013 1
Her it prints 1 of its one day, and 2 if its one month.
It take in count that February may have 28 or 29 days
awk ' BEGIN { arr="31,28,31,30,31,30,31,31,30,31,30,31" split(arr, month, ",") x=0} { split($1, sd, "-") split($2, ed, "-") t=(mktime(ed[3] s ed[2] s ed[1] s 0 s 0 s 0)-mktime(sd[3] s sd[2] s sd[1] s 0 s 0 s 0))/86400 month[2]=sd[3]%4==0?29:28 } t==month[sd[2]+0] {x=2} t==1 {x=1} {print $0,x x=0} ' s=' ' file 09-11-2013 09-12-2013 2 10-02-2013 10-02-2013 0 26-10-2013 27-10-2013 1 12-01-2013 12-02-2013 2 22-02-2013 23-02-2013 1