File: scan.sbr.sample1

package info (click to toggle)
im 91-1
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 832 kB
  • ctags: 8
  • sloc: sh: 1,507; makefile: 110
file content (28 lines) | stat: -rw-r--r-- 853 bytes parent folder | download | duplicates (3)
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
$symbol_table{'W'} = 'wdate:';
$NEEDSAFE_HASH{'wdate:'} = 1;    # if the field contains JIS characters

sub scan_sub {
	local ($href) = shift;

    if (${$href}{'date'} =~ /([A-Z][a-z][a-z]), /) {
        if ($+ eq 'Mon') {
            ${$href}{'wdate:'} = '月';
        } elsif ($+ eq 'Tue') {
            ${$href}{'wdate:'} = '火';
        } elsif ($+ eq 'Wed') {
            ${$href}{'wdate:'} = '水';
        } elsif ($+ eq 'Thu') {
            ${$href}{'wdate:'} = '木';
        } elsif ($+ eq 'Fri') {
            ${$href}{'wdate:'} = '金';
        } elsif ($+ eq 'Sat') {
            ${$href}{'wdate:'} = '土';
        } elsif ($+ eq 'Sun') {
            ${$href}{'wdate:'} = '日';
        } else {
            ${$href}{'wdate:'} = "$+";
        }
    } else {
        ${$href}{'wdate:'} = '??';
    }
}