In your 1st case as per my knowledge its applicable sandwich rule. employee is absent continuously from 1st September to 4th, if he present on 4th then sandwich rule not applicable.
2nd case if employee takes leave from Monday i.e 15th to 17th then only 2 days will deduct from his leave balance i.e 15th & 16th only considering he will present on 13th & 18th
3rd October 2018 From India, Mumbai
However as per Factory Act in case of EL holidays intervening leave is not counted as a part of leave.
R R Kapoor Vadodara
4th October 2018 From India, Vadodara