Partitioning Social Networks for Time-dependent Queries